[coreboot-gerrit] Change in coreboot[master]: cbfstool: make comments more consistent
Joel Kitching (Code Review)
gerrit at coreboot.org
Thu Oct 11 11:49:37 CEST 2018
Joel Kitching has uploaded this change for review. ( https://review.coreboot.org/29025
Change subject: cbfstool: make comments more consistent
......................................................................
cbfstool: make comments more consistent
Fix a typo and make comments more consistent (start with
capital letter).
BUG=None
TEST=None
Change-Id: I97bff5e05596fc6973f0729e276a2e45b291120d
---
M util/cbfstool/cbfstool.c
1 file changed, 15 insertions(+), 16 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/25/29025/1
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c
index f8b1f65..28e0e5d 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;
@@ -1215,7 +1214,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;
@@ -1558,7 +1557,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",
--
To view, visit https://review.coreboot.org/29025
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I97bff5e05596fc6973f0729e276a2e45b291120d
Gerrit-Change-Number: 29025
Gerrit-PatchSet: 1
Gerrit-Owner: Joel Kitching <kitching at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181011/66233f68/attachment.html>
More information about the coreboot-gerrit
mailing list