summaryrefslogtreecommitdiff
path: root/util/nvramtool/cli/opts.c
diff options
context:
space:
mode:
authorVikram Narayanan <vikram186@gmail.com>2012-04-14 15:25:13 +0530
committerPatrick Georgi <patrick@georgi-clan.de>2012-04-21 09:36:24 +0200
commita8111cf980e01e9f8706024f06c05840b5fc8bcf (patch)
treef08af47ce9c1efa72b08b4a44e64b2ddc866cc2d /util/nvramtool/cli/opts.c
parentc3fc4b933708a594d169e40a82d5f29f304d11c9 (diff)
nvramtool: Unify nvramtool and build_opt_tbl
As cmos.layout parsing capabilities are already there in nvramtool, use those than using build_opt_tbl.c. Add binary and header file generation in nvramtool. Make appropriate changes to Makefile.inc. Change-Id: Iaf3f5d4f51451aeb33c92800a0c895045f2388cf Signed-off-by: Vikram Narayanan <vikram186@gmail.com> Reviewed-on: http://review.coreboot.org/898 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'util/nvramtool/cli/opts.c')
-rw-r--r--util/nvramtool/cli/opts.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/util/nvramtool/cli/opts.c b/util/nvramtool/cli/opts.c
index 49496495eb..8e920e8694 100644
--- a/util/nvramtool/cli/opts.c
+++ b/util/nvramtool/cli/opts.c
@@ -41,7 +41,7 @@ static void register_op_modifier(nvramtool_op_modifier_t mod, char mod_param[]);
static void resolve_op_modifiers(void);
static void sanity_check_args(void);
-static const char getopt_string[] = "-ab:B:c::C:dD:e:hil::np:r:tvw:xX:y:Y";
+static const char getopt_string[] = "-ab:B:c::C:dD:e:hH:iL:l::np:r:tvw:xX:y:Y";
/****************************************************************************
* parse_nvramtool_args
@@ -100,6 +100,9 @@ void parse_nvramtool_args(int argc, char *argv[])
case 'h':
register_op(&op_found, NVRAMTOOL_OP_SHOW_USAGE, NULL);
break;
+ case 'H':
+ register_op(&op_found, NVRAMTOOL_OP_WRITE_HEADER_FILE, optarg);
+ break;
case 'i':
register_op(&op_found,
NVRAMTOOL_OP_CMOS_SET_PARAMS_STDIN, NULL);
@@ -108,6 +111,10 @@ void parse_nvramtool_args(int argc, char *argv[])
register_op(&op_found, NVRAMTOOL_OP_LBTABLE_SHOW_INFO,
handle_optional_arg(argc, argv));
break;
+ case 'L':
+ register_op(&op_found, NVRAMTOOL_OP_WRITE_BINARY_FILE,
+ optarg);
+ break;
case 'n':
register_op_modifier(NVRAMTOOL_MOD_SHOW_VALUE_ONLY,
NULL);