AUTHORS, util/: Drop individual copyright notices
[coreboot.git] / util / nvramtool / cli / opts.h
blobf04a3b0514abc9b9ddaca3c8a8e0f61012396b02
1 /*****************************************************************************\
2 * opts.h
3 *****************************************************************************
4 * This file is part of nvramtool, a utility for reading/writing coreboot
5 * parameters and displaying information from the coreboot table.
6 * For details, see https://coreboot.org/nvramtool.
8 * Please also read the file DISCLAIMER which is included in this software
9 * distribution.
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License (as published by the
13 * Free Software Foundation) version 2, dated June 1991.
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
18 * conditions of the GNU General Public License for more details.
19 \*****************************************************************************/
21 #ifndef OPTS_H
22 #define OPTS_H
24 #include "common.h"
26 typedef enum { NVRAMTOOL_OP_SHOW_VERSION = 0,
27 NVRAMTOOL_OP_SHOW_USAGE,
28 NVRAMTOOL_OP_LBTABLE_SHOW_INFO,
29 NVRAMTOOL_OP_LBTABLE_DUMP,
30 NVRAMTOOL_OP_SHOW_PARAM_VALUES,
31 NVRAMTOOL_OP_CMOS_SHOW_ONE_PARAM,
32 NVRAMTOOL_OP_CMOS_SHOW_ALL_PARAMS,
33 NVRAMTOOL_OP_CMOS_SET_ONE_PARAM,
34 NVRAMTOOL_OP_CMOS_SET_PARAMS_STDIN,
35 NVRAMTOOL_OP_CMOS_SET_PARAMS_FILE,
36 NVRAMTOOL_OP_CMOS_CHECKSUM,
37 NVRAMTOOL_OP_SHOW_LAYOUT,
38 NVRAMTOOL_OP_WRITE_CMOS_DUMP,
39 NVRAMTOOL_OP_READ_CMOS_DUMP,
40 NVRAMTOOL_OP_SHOW_CMOS_HEX_DUMP,
41 NVRAMTOOL_OP_SHOW_CMOS_DUMPFILE,
42 NVRAMTOOL_OP_WRITE_BINARY_FILE,
43 NVRAMTOOL_OP_WRITE_HEADER_FILE
44 } nvramtool_op_t;
46 typedef struct {
47 nvramtool_op_t op;
48 char *param;
49 } nvramtool_op_info_t;
51 typedef enum { NVRAMTOOL_MOD_SHOW_VALUE_ONLY = 0,
52 NVRAMTOOL_MOD_USE_CMOS_LAYOUT_FILE,
53 NVRAMTOOL_MOD_USE_CBFS_FILE,
54 NVRAMTOOL_MOD_USE_CMOS_FILE,
55 NVRAMTOOL_MOD_USE_CMOS_OPT_TABLE,
56 NVRAMTOOL_NUM_OP_MODIFIERS /* must always be last */
57 } nvramtool_op_modifier_t;
59 typedef struct {
60 int found;
61 int found_seq;
62 char *param;
63 } nvramtool_op_modifier_info_t;
65 extern nvramtool_op_info_t nvramtool_op;
67 extern nvramtool_op_modifier_info_t nvramtool_op_modifiers[];
69 void parse_nvramtool_args(int argc, char *argv[]);
71 #endif /* OPTS_H */