[coreboot-gerrit] Change in coreboot[master]: util/cbfstool: Add "truncate" command

Julius Werner (Code Review) gerrit at coreboot.org
Thu Sep 21 00:40:55 CEST 2017


Julius Werner has posted comments on this change. ( https://review.coreboot.org/21608 )

Change subject: util/cbfstool: Add "truncate" command
......................................................................


Patch Set 1:

(3 comments)

https://review.coreboot.org/#/c/21608/1/util/cbfstool/cbfs_image.c
File util/cbfstool/cbfs_image.c:

https://review.coreboot.org/#/c/21608/1/util/cbfstool/cbfs_image.c@507
PS1, Line 507: 	 * empty, we still want to keep it or we remove the entire filesystem.
I'd say this (removing the entire filesystem) would be the more natural thing to do here. It might make sense in edge cases, e.g. imagine a situation where you have an extra CBFS FMAP section somewhere that may optionally contain something (we actually have that with RW_LEGACY already, although it's not verified). If the build system decides (from config options or whatever) not to add any files, you would still want it truncated so that it doesn't waste bytes on verification.


https://review.coreboot.org/#/c/21608/1/util/cbfstool/cbfs_image.c@509
PS1, Line 509: 	 * If that file is empty, remove it and report its header's offset as
nit: Put this comment in front of the next if() so it's clear which comment belongs to what code section.


https://review.coreboot.org/#/c/21608/1/util/cbfstool/cbfs_image.c@519
PS1, Line 519: 		/* nothing to truncate */
In both of the return 1 cases, should size be adjusted to the actual end of the CBFS? It might be different from buffer_size if the CBFS had already been truncated previously.



-- 
To view, visit https://review.coreboot.org/21608
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0c747090813898539f3428936afa9d8459adee9c
Gerrit-Change-Number: 21608
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Georgi <pgeorgi at google.com>
Gerrit-Reviewer: Julius Werner <jwerner at chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
Gerrit-Comment-Date: Wed, 20 Sep 2017 22:40:55 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170920/167b6237/attachment.html>


More information about the coreboot-gerrit mailing list