UPSTREAM: cbfstool: make comments more consistent
Fix a typo and make comments more consistent (start with
capital letter).
BUG=None
TEST=None
Change-Id: If99e2fe1250633274963c8fad308969064bef30b
Signed-off-by: Martin Roth <martinroth@google.com>
Original-Commit-Id: 672d5ad20b8c9aab677e754dc2996f1e5a30cb77
Original-Change-Id: I97bff5e05596fc6973f0729e276a2e45b291120d
Original-Signed-off-by: Joel Kitching <kitching@google.com>
Original-Reviewed-on: https://review.coreboot.org/29025
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-on: https://chromium-review.googlesource.com/1280010
Commit-Ready: Martin Roth <martinroth@chromium.org>
Tested-by: Martin Roth <martinroth@chromium.org>
Reviewed-by: Martin Roth <martinroth@chromium.org>
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c
index 54e2e95..ba42996 100644
--- a/util/cbfstool/cbfstool.c
+++ b/util/cbfstool/cbfstool.c
@@ -87,7 +87,7 @@
enum comp_algo compression;
int precompression;
enum vb2_hash_algorithm hash;
- /* for linux payloads */
+ /* For linux payloads */
char *initrd;
char *cmdline;
int force;
@@ -140,7 +140,7 @@
{
assert(region);
- /* cover the situation where a negative base address is given by the
+ /* Cover the situation where a negative base address is given by the
* user. Callers of this function negate it, so it'll be a positive
* number smaller than the region.
*/
@@ -283,7 +283,7 @@
static void fill_header_offset(void *location, uint32_t offset)
{
- // TODO: when we have a BE target, we'll need to store this as BE
+ // TODO: When we have a BE target, we'll need to store this as BE
write_le32(location, offset);
}
@@ -384,7 +384,7 @@
buffer_size(&image.buffer) - 4);
fill_header_offset(h_loc, header_offset);
/*
- * if top swap present, update the header
+ * If top swap present, update the header
* location in secondary bootblock
*/
if (param.topswap_size) {
@@ -413,7 +413,7 @@
}
/*
- * allocate topswap_size*2 bytes for bootblock to
+ * Allocate topswap_size*2 bytes for bootblock to
* accommodate the second bootblock.
*/
struct buffer new_bootblock, bb1, bb2;
@@ -427,15 +427,15 @@
buffer_size(&new_bootblock) - bb_buf_size,
bb_buf_size);
- /* copy to first bootblock */
+ /* Copy to first bootblock */
memcpy(buffer_get(&bb1), buffer_get(buffer), bb_buf_size);
- /* copy to second bootblock */
+ /* Copy to second bootblock */
memcpy(buffer_get(&bb2), buffer_get(buffer), bb_buf_size);
buffer_delete(buffer);
buffer_clone(buffer, &new_bootblock);
- /* update the location (offset) of bootblock in the region */
+ /* Update the location (offset) of bootblock in the region */
*offset = convert_to_from_top_aligned(param.image_region,
buffer_size(buffer));
@@ -633,7 +633,6 @@
* mapped one.
* If the FSP component is not xip, then use param.baseaddress that is
* passed in by the caller.
- *
*/
if (param.stage_xip) {
if (!IS_TOP_ALIGNED_ADDRESS(address))
@@ -711,7 +710,7 @@
/*
* Ensure the address is a memory mapped one. This assumes
- * x86 semantics about th boot media being directly mapped
+ * x86 semantics about the boot media being directly mapped
* below 4GiB in the CPU address space.
**/
address = -convert_to_from_absolute_top_aligned(
@@ -727,7 +726,7 @@
if (ret != 0)
return -1;
buffer_delete(buffer);
- // direct assign, no dupe.
+ // Direct assign, no dupe.
memcpy(buffer, &output, sizeof(*buffer));
header->len = htonl(output.size);
return 0;
@@ -738,7 +737,7 @@
{
struct buffer output;
int ret;
- /* per default, try and see if payload is an ELF binary */
+ /* Per default, try and see if payload is an ELF binary */
ret = parse_elf_to_payload(buffer, &output, param.compression);
/* If it's not an ELF, see if it's a FIT */
@@ -765,7 +764,7 @@
}
buffer_delete(buffer);
- // direct assign, no dupe.
+ // Direct assign, no dupe.
memcpy(buffer, &output, sizeof(*buffer));
header->len = htonl(output.size);
return 0;
@@ -782,7 +781,7 @@
return -1;
}
buffer_delete(buffer);
- // direct assign, no dupe.
+ // Direct assign, no dupe.
memcpy(buffer, &output, sizeof(*buffer));
header->len = htonl(output.size);
return 0;
@@ -1213,7 +1212,7 @@
uint32_t addr = 0;
/*
- * get the address of provided region for first row.
+ * Get the address of provided region for first row.
*/
if (param.ucode_region) {
struct buffer ucode;
@@ -1556,7 +1555,7 @@
break;
}
- /* filter out illegal long options */
+ /* Filter out illegal long options */
if (strchr(commands[i].optstring, c) == NULL) {
/* TODO maybe print actual long option instead */
ERROR("%s: invalid option -- '%c'\n",