Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Unified Diff: utility/vbutil_kernel.c

Issue 3520019: Allow --repack option to change kernel version number. (Closed) Base URL: http://git.chromium.org/git/vboot_reference.git
Patch Set: Fixed indentation warnings. Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utility/vbutil_kernel.c
diff --git a/utility/vbutil_kernel.c b/utility/vbutil_kernel.c
index acf156f7048ac0a4cc4cafb814049220605620ff..391f5ad284722d1b22776518e3d816f5599700ab 100644
--- a/utility/vbutil_kernel.c
+++ b/utility/vbutil_kernel.c
@@ -91,13 +91,14 @@ static int PrintHelp(char *progname) {
"\nOR\n\n"
"Usage: %s --repack <file> [PARAMETERS]\n"
"\n"
- " Required parameters (of --keyblock and --config at least "
- "one is required):\n"
+ " Required parameters (of --keyblock, --config, and --version \n"
+ " at least one is required):\n"
" --keyblock <file> Key block in .keyblock format\n"
" --signprivate <file>"
" Private key to sign kernel data, in .vbprivk format\n"
" --oldblob <file> Previously packed kernel blob\n"
" --config <file> New command line file\n"
+ " --version <number> Kernel version\n"
"\n"
" Optional:\n"
" --pad <number> Verification padding size in bytes\n"
@@ -846,9 +847,10 @@ int main(int argc, char* argv[]) {
return r;
case OPT_MODE_REPACK:
- if (!config_file && !key_block_file) {
+ if (!config_file && !key_block_file && !version) {
fprintf(stderr,
- "You must supply at least one of --config and --keyblock\n");
+ "You must supply at least one of "
+ "--config, --keyblock or --version\n");
return 1;
}
@@ -857,6 +859,9 @@ int main(int argc, char* argv[]) {
return 1;
r = ReplaceConfig(bp, config_file);
if (!r) {
+ if (version) {
+ bp->kernel_version = version;
+ }
r = Pack(filename, key_block_file, signprivate, bp, pad, vblockonly);
}
FreeBlob(bp);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698