From 9c647efd7fbbed299d289951e116b793ab7ec732 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Tue, 3 Mar 2015 10:39:08 -0800 Subject: cleanup: Fix some typos in comments No code changes, just fix a few spelling errors and change C++ style comments to C-style. BUG=none BRANCH=none TEST=make runtests Change-Id: I153f821a3f42a92867c7dc4761a2bcde7f2518c4 Signed-off-by: Bill Richardson Reviewed-on: https://chromium-review.googlesource.com/256123 Reviewed-by: Daisuke Nojiri --- firmware/2lib/2nvstorage.c | 2 +- firmware/2lib/2secdata.c | 2 +- firmware/2lib/include/2crypto.h | 2 +- firmware/2lib/include/2recovery_reasons.h | 2 +- firmware/2lib/include/2return_codes.h | 10 +++++----- firmware/2lib/include/2struct.h | 4 ++-- firmware/lib/vboot_kernel.c | 2 +- firmware/lib21/api.c | 4 ++-- tests/vboot_api_init_tests.c | 2 +- utility/include/bmpblk_utility.h | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/firmware/2lib/2nvstorage.c b/firmware/2lib/2nvstorage.c index 68a4dad0..93d704c8 100644 --- a/firmware/2lib/2nvstorage.c +++ b/firmware/2lib/2nvstorage.c @@ -63,7 +63,7 @@ void vb2_nv_init(struct vb2_context *ctx) /* Set status flag */ sd->status |= VB2_SD_STATUS_NV_REINIT; - // TODO: unit test for status flag being set + /* TODO: unit test for status flag being set */ } sd->status |= VB2_SD_STATUS_NV_INIT; diff --git a/firmware/2lib/2secdata.c b/firmware/2lib/2secdata.c index c2983e71..0fd6c522 100644 --- a/firmware/2lib/2secdata.c +++ b/firmware/2lib/2secdata.c @@ -50,7 +50,7 @@ int vb2_secdata_init(struct vb2_context *ctx) /* Set status flag */ sd->status |= VB2_SD_STATUS_SECDATA_INIT; - // TODO: unit test for that + /* TODO: unit test for that */ /* Read this now to make sure crossystem has it even in rec mode. */ rv = vb2_secdata_get(ctx, VB2_SECDATA_VERSIONS, diff --git a/firmware/2lib/include/2crypto.h b/firmware/2lib/include/2crypto.h index 559a8ed1..f58dc0a2 100644 --- a/firmware/2lib/include/2crypto.h +++ b/firmware/2lib/include/2crypto.h @@ -35,7 +35,7 @@ enum vb2_signature_algorithm { /* * No signature algorithm. The digest is unsigned. See - * VB2_GUID_NONE_* above for key GUIDs to use with this algorithm. + * VB2_GUID_NONE_* for key GUIDs to use with this algorithm. */ VB2_SIG_NONE = 1, diff --git a/firmware/2lib/include/2recovery_reasons.h b/firmware/2lib/include/2recovery_reasons.h index 3633fe1b..1c765313 100644 --- a/firmware/2lib/include/2recovery_reasons.h +++ b/firmware/2lib/include/2recovery_reasons.h @@ -104,7 +104,7 @@ enum vb2_nv_recovery { VB2_RECOVERY_EC_HASH_MISMATCH = 0x2a, /* New error codes from VB2 */ - // TODO: may need to add strings for these in the original fwlib + /* TODO: may need to add strings for these in the original fwlib */ /* Secure data inititalization error */ VB2_RECOVERY_SECDATA_INIT = 0x2b, diff --git a/firmware/2lib/include/2return_codes.h b/firmware/2lib/include/2return_codes.h index 384879dc..90b7246d 100644 --- a/firmware/2lib/include/2return_codes.h +++ b/firmware/2lib/include/2return_codes.h @@ -381,7 +381,7 @@ enum vb2_return_code { */ VB2_ERROR_API = VB2_ERROR_BASE + 0x090000, - /* Bag tag in vb2api_init_hash() */ + /* Bad tag in vb2api_init_hash() */ VB2_ERROR_API_INIT_HASH_TAG, /* Preamble not present in vb2api_init_hash() */ @@ -411,22 +411,22 @@ enum vb2_return_code { /* Work buffer too small in vb2api_check_hash() */ VB2_ERROR_API_CHECK_HASH_WORKBUF_DIGEST, - /* Bag tag in vb2api_check_hash() */ + /* Bad tag in vb2api_check_hash() */ VB2_ERROR_API_CHECK_HASH_TAG, /* Missing firmware data key in vb2api_check_hash() */ VB2_ERROR_API_CHECK_HASH_DATA_KEY, - /* Siganature size mismatch in vb2api_check_hash() */ + /* Signature size mismatch in vb2api_check_hash() */ VB2_ERROR_API_CHECK_HASH_SIG_SIZE, /* Phase one needs recovery mode */ VB2_ERROR_API_PHASE1_RECOVERY, - /* Bag tag in vb2api_check_hash() */ + /* Bad tag in vb2api_check_hash() */ VB2_ERROR_API_INIT_HASH_GUID, - /* Siganature mismatch in vb2api_check_hash() */ + /* Signature mismatch in vb2api_check_hash() */ VB2_ERROR_API_CHECK_HASH_SIG, /* Invalid enum vb2_pcr_digest requested to vb2api_get_pcr_digest */ diff --git a/firmware/2lib/include/2struct.h b/firmware/2lib/include/2struct.h index 3339a30d..b64f4ba8 100644 --- a/firmware/2lib/include/2struct.h +++ b/firmware/2lib/include/2struct.h @@ -121,14 +121,14 @@ struct vb2_shared_data { uint32_t workbuf_data_key_size; /* - * Offset and size of firmware preamble in work buffer. Size if 0 if + * Offset and size of firmware preamble in work buffer. Size is 0 if * preamble is not stored in the work buffer. */ uint32_t workbuf_preamble_offset; uint32_t workbuf_preamble_size; /* - * Offset and size of hash context in work buffer. Size if 0 if + * Offset and size of hash context in work buffer. Size is 0 if * hash context is not stored in the work buffer. */ uint32_t workbuf_hash_offset; diff --git a/firmware/lib/vboot_kernel.c b/firmware/lib/vboot_kernel.c index 9ea054c3..09ea3c77 100644 --- a/firmware/lib/vboot_kernel.c +++ b/firmware/lib/vboot_kernel.c @@ -201,7 +201,7 @@ VbError_t LoadKernel(LoadKernelParams *params, VbCommonParams *cparams) goto bad_kernel; /* - * In developer mode, we can explictly disallow + * In developer mode, we can explicitly disallow * self-signed kernels */ if (require_official_os) { diff --git a/firmware/lib21/api.c b/firmware/lib21/api.c index 7c1aa014..c905a62a 100644 --- a/firmware/lib21/api.c +++ b/firmware/lib21/api.c @@ -160,8 +160,8 @@ int vb2api_check_hash(struct vb2_context *ctx) digest_size)) return VB2_ERROR_API_CHECK_HASH_SIG; - // TODO: the old check-hash function called vb2_fail() on any mismatch. - // I don't think it should do that; the caller should. + /* TODO: the old check-hash function called vb2_fail() on any mismatch. + * I don't think it should do that; the caller should. */ return VB2_SUCCESS; } diff --git a/tests/vboot_api_init_tests.c b/tests/vboot_api_init_tests.c index 96ab9d33..331ba72d 100644 --- a/tests/vboot_api_init_tests.c +++ b/tests/vboot_api_init_tests.c @@ -651,7 +651,7 @@ static void VbInitTestBackup(void) TEST_EQ(shared->flags, VBSD_BOOT_DEV_SWITCH_ON, " shared flags"); TEST_EQ(backup_write_called, 1, " Once more, one backup"); - /* But if we explictly request a backup, they'll get saved. */ + /* But if we explicitly request a backup, they'll get saved. */ VbNvSet(&vnc, VBNV_BACKUP_NVRAM_REQUEST, 1); VbNvTeardown(&vnc); TestVbInit(0, 0, "Dev mode on"); diff --git a/utility/include/bmpblk_utility.h b/utility/include/bmpblk_utility.h index fec2b02f..1d2fb94e 100644 --- a/utility/include/bmpblk_utility.h +++ b/utility/include/bmpblk_utility.h @@ -56,7 +56,7 @@ class BmpBlockUtil { BmpBlockUtil(bool debug); ~BmpBlockUtil(); - /* Load all the images and related infomations according to a config file. */ + /* Load all the images and related information according to a config file. */ void load_from_config(const char *filename); /* Contruct the bmpblock. */ -- cgit v1.2.1