diff options
author | Bill Richardson <wfrichar@chromium.org> | 2013-03-20 15:02:34 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-03-20 23:47:50 -0700 |
commit | 3f806a2abf07d7b801852a4a6f3a9080a4b5c427 (patch) | |
tree | 936deb68cac1010957023c1e7cc8f2988feddd25 /utility | |
parent | 95bae09c7e54a604d89f16b4a8e8b946642af8e7 (diff) | |
download | vboot-3f806a2abf07d7b801852a4a6f3a9080a4b5c427.tar.gz |
Apply consistent naming scheme for hostlib functions.
The chromeos-installer uses several functions from the vboot_reference
userspace library, but the names of those functions are inconsistent:
IsZero
MapFile
VbGetSystemPropertyString
cgpt_add
cgpt_boot
cgpt_create
cgpt_get_boot_partition_number
cgpt_get_num_non_empty_partitions
cgpt_get_partition_details
cgpt_prioritize
cgpt_set_attributes
find_kernel_config
The Google C++ style guide says types and functions should use CamelCase,
while variables use lower_case_with_underscores.
Kernel style (which vboot_reference tries to be more-or-less compatible
with) uses lower_case_with_underscores for everything, but that really only
has to apply to firmware stuff. For userspace, we can use the Google style.
BUG=chromium:221544
BRANCH=none
TEST=buildbot
CQ-DEPEND=CL:46045
Renaming/cleanup only; no functional changes.
Change-Id: I9c82c9ff8909be88586194c8ffdb435fc771195f
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/46044
Diffstat (limited to 'utility')
-rw-r--r-- | utility/dump_kernel_config.c | 4 | ||||
-rw-r--r-- | utility/dump_kernel_config_lib.c | 4 | ||||
-rw-r--r-- | utility/include/dump_kernel_config.h | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/utility/dump_kernel_config.c b/utility/dump_kernel_config.c index 20a51871..0a8e0279 100644 --- a/utility/dump_kernel_config.c +++ b/utility/dump_kernel_config.c @@ -83,13 +83,13 @@ int main(int argc, char* argv[]) { } /* Map the kernel image blob. */ - blob = MapFile(infile, &blob_size); + blob = MMapFile(infile, &blob_size); if (!blob) { VbExError("Error reading input file\n"); return 1; } - config = find_kernel_config(blob, (uint64_t)blob_size, + config = FindKernelConfig(blob, (uint64_t)blob_size, kernel_body_load_address); if (!config) { VbExError("Error parsing input file\n"); diff --git a/utility/dump_kernel_config_lib.c b/utility/dump_kernel_config_lib.c index a6989e1c..9559a739 100644 --- a/utility/dump_kernel_config_lib.c +++ b/utility/dump_kernel_config_lib.c @@ -13,7 +13,7 @@ #include "kernel_blob.h" #include "vboot_api.h" -uint8_t* find_kernel_config(uint8_t* blob, uint64_t blob_size, +uint8_t* FindKernelConfig(uint8_t* blob, uint64_t blob_size, uint64_t kernel_body_load_address) { VbKeyBlockHeader* key_block; @@ -54,7 +54,7 @@ uint8_t* find_kernel_config(uint8_t* blob, uint64_t blob_size, return blob + offset; } -void* MapFile(const char* filename, size_t *size) { +void* MMapFile(const char* filename, size_t *size) { FILE* f; uint8_t* buf; long file_size = 0; diff --git a/utility/include/dump_kernel_config.h b/utility/include/dump_kernel_config.h index c6f9b2b6..2289da72 100644 --- a/utility/include/dump_kernel_config.h +++ b/utility/include/dump_kernel_config.h @@ -11,9 +11,9 @@ #include <inttypes.h> #include <stdlib.h> -uint8_t* find_kernel_config(uint8_t* blob, uint64_t blob_size, +uint8_t* FindKernelConfig(uint8_t* blob, uint64_t blob_size, uint64_t kernel_body_load_address); -void* MapFile(const char* filename, size_t *size); +void* MMapFile(const char* filename, size_t *size); #endif // DUMP_KERNEL_CONFIG_UTILITY_H_ |