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

Unified Diff: utility/vbutil_kernel.c

Issue 3968006: Consider zero a valid kernel version. (Closed) Base URL: http://git.chromium.org/git/vboot_reference.git
Patch Set: 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 23b6eb2f0cffb71156e40aab579185ddd9ea91f8..cb4768185c2baeffd80186f1df7f4406759180cb 100644
--- a/utility/vbutil_kernel.c
+++ b/utility/vbutil_kernel.c
@@ -750,7 +750,7 @@ int main(int argc, char* argv[]) {
char* key_block_file = NULL;
char* signpubkey = NULL;
char* signprivate = NULL;
- uint64_t version = 0;
+ int version = -1;
char* vmlinuz = NULL;
char* bootloader = NULL;
char* config_file = NULL;
@@ -862,7 +862,7 @@ int main(int argc, char* argv[]) {
return r;
case OPT_MODE_REPACK:
- if (!config_file && !key_block_file && !version) {
+ if (!config_file && !key_block_file && (version<0)) {
fprintf(stderr,
"You must supply at least one of "
"--config, --keyblock or --version\n");
@@ -874,8 +874,8 @@ int main(int argc, char* argv[]) {
return 1;
r = ReplaceConfig(bp, config_file);
if (!r) {
- if (version) {
- bp->kernel_version = version;
+ if (version >= 0) {
+ bp->kernel_version = (uint64_t) version;
}
r = Pack(filename, key_block_file, signprivate, bp, pad, vblockonly);
}
« 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