1 /*****************************************************************************\
3 *****************************************************************************
4 * Please also read the file DISCLAIMER which is included in this software
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License (as published by the
9 * Free Software Foundation) version 2, dated June 1991.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
14 * conditions of the GNU General Public License for more details.
15 \*****************************************************************************/
22 typedef enum { NVRAMTOOL_OP_SHOW_VERSION
= 0,
23 NVRAMTOOL_OP_SHOW_USAGE
,
24 NVRAMTOOL_OP_LBTABLE_SHOW_INFO
,
25 NVRAMTOOL_OP_LBTABLE_DUMP
,
26 NVRAMTOOL_OP_SHOW_PARAM_VALUES
,
27 NVRAMTOOL_OP_CMOS_SHOW_ONE_PARAM
,
28 NVRAMTOOL_OP_CMOS_SHOW_ALL_PARAMS
,
29 NVRAMTOOL_OP_CMOS_SET_ONE_PARAM
,
30 NVRAMTOOL_OP_CMOS_SET_PARAMS_STDIN
,
31 NVRAMTOOL_OP_CMOS_SET_PARAMS_FILE
,
32 NVRAMTOOL_OP_CMOS_CHECKSUM
,
33 NVRAMTOOL_OP_SHOW_LAYOUT
,
34 NVRAMTOOL_OP_WRITE_CMOS_DUMP
,
35 NVRAMTOOL_OP_READ_CMOS_DUMP
,
36 NVRAMTOOL_OP_SHOW_CMOS_HEX_DUMP
,
37 NVRAMTOOL_OP_SHOW_CMOS_DUMPFILE
,
38 NVRAMTOOL_OP_WRITE_BINARY_FILE
,
39 NVRAMTOOL_OP_WRITE_HEADER_FILE
45 } nvramtool_op_info_t
;
47 typedef enum { NVRAMTOOL_MOD_SHOW_VALUE_ONLY
= 0,
48 NVRAMTOOL_MOD_USE_CMOS_LAYOUT_FILE
,
49 NVRAMTOOL_MOD_USE_CBFS_FILE
,
50 NVRAMTOOL_MOD_USE_CMOS_FILE
,
51 NVRAMTOOL_MOD_USE_CMOS_OPT_TABLE
,
52 NVRAMTOOL_NUM_OP_MODIFIERS
/* must always be last */
53 } nvramtool_op_modifier_t
;
59 } nvramtool_op_modifier_info_t
;
61 extern nvramtool_op_info_t nvramtool_op
;
63 extern nvramtool_op_modifier_info_t nvramtool_op_modifiers
[];
65 void parse_nvramtool_args(int argc
, char *argv
[]);