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

Unified Diff: utility/load_kernel_test.c

Issue 2905006: Add an optional flag argument to load_kernel_test. (Closed) Base URL: ssh://git@chromiumos-git/vboot_reference.git
Patch Set: .. Created 10 years, 5 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/load_kernel_test.c
diff --git a/utility/load_kernel_test.c b/utility/load_kernel_test.c
index 1f44857902c02aa158bdbebf77002e445c82a862..7055dccb153b71d16da6fb2398868e9768068362 100644
--- a/utility/load_kernel_test.c
+++ b/utility/load_kernel_test.c
@@ -82,8 +82,8 @@ int main(int argc, char* argv[]) {
lkp.bytes_per_lba = LBA_BYTES;
/* Read command line parameters */
- if (3 > argc) {
- fprintf(stderr, "usage: %s <drive_image> <sign_key>\n", argv[0]);
+ if (4 > argc) {
+ fprintf(stderr, "usage: %s <drive_image> <sign_key> [boot flag]\n", argv[0]);
return 1;
}
image_name = argv[1];
@@ -118,11 +118,14 @@ int main(int argc, char* argv[]) {
return 1;
}
- /* TODO: Option for boot mode - developer, recovery */
/* Need to skip the address check, since we're putting it somewhere on the
* heap instead of its actual target address in the firmware. */
- lkp.boot_flags = BOOT_FLAG_SKIP_ADDR_CHECK | BOOT_FLAG_RECOVERY;
-
+ if (argc == 4) {
+ lkp.boot_flags = atoi(argv[3]) | BOOT_FLAG_SKIP_ADDR_CHECK;
+ } else {
+ /* Default to recovery. */
+ lkp.boot_flags = BOOT_FLAG_SKIP_ADDR_CHECK | BOOT_FLAG_RECOVERY;
+ }
/* Call LoadKernel() */
rv = LoadKernel(&lkp);
printf("LoadKernel() returned %d\n", rv);
« 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