summaryrefslogtreecommitdiff
path: root/util/nvramtool/opts.c
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@secunet.com>2011-01-21 07:29:40 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2011-01-21 07:29:40 +0000
commit202be7b6b7e06597f672426af29649c92353db17 (patch)
treed8b6c8376e522d720be449df5e8872bfada3cc6f /util/nvramtool/opts.c
parent269e932340869696abfaeb63736ba887d88ef690 (diff)
downloadcoreboot-202be7b6b7e06597f672426af29649c92353db17.tar.xz
Add nvramtool -D option that allows taking cmos data from
a plain binary file. Overrides using cmos.default in CBFS if both -C and -D are given. Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com> Acked-by: Stefan Reinauer <stepan@coreboot.org> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6286 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/nvramtool/opts.c')
-rw-r--r--util/nvramtool/opts.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/util/nvramtool/opts.c b/util/nvramtool/opts.c
index 9aaeedfbfd..49496495eb 100644
--- a/util/nvramtool/opts.c
+++ b/util/nvramtool/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:de:hil::np:r:tvw:xX:y:Y";
+static const char getopt_string[] = "-ab:B:c::C:dD:e:hil::np:r:tvw:xX:y:Y";
/****************************************************************************
* parse_nvramtool_args
@@ -89,6 +89,10 @@ void parse_nvramtool_args(int argc, char *argv[])
case 'd':
register_op(&op_found, NVRAMTOOL_OP_LBTABLE_DUMP, NULL);
break;
+ case 'D':
+ register_op_modifier(NVRAMTOOL_MOD_USE_CMOS_FILE,
+ optarg);
+ break;
case 'e':
register_op(&op_found, NVRAMTOOL_OP_SHOW_PARAM_VALUES,
optarg);