Rename lxbios to nvramtool, step 3 (rename directory).
[coreboot.git] / util / nvramtool / opts.h
1 /*****************************************************************************\
2  * opts.h
3  * $Id$
4  *****************************************************************************
5  *  Copyright (C) 2002-2005 The Regents of the University of California.
6  *  Produced at the Lawrence Livermore National Laboratory.
7  *  Written by Dave Peterson <dsp@llnl.gov> <dave_peterson@pobox.com>.
8  *  UCRL-CODE-2003-012
9  *  All rights reserved.
10  *
11  *  This file is part of nvramtool, a utility for reading/writing coreboot
12  *  parameters and displaying information from the coreboot table.
13  *  For details, see http://coreboot.org/nvramtool.
14  *
15  *  Please also read the file DISCLAIMER which is included in this software
16  *  distribution.
17  *
18  *  This program is free software; you can redistribute it and/or modify it
19  *  under the terms of the GNU General Public License (as published by the
20  *  Free Software Foundation) version 2, dated June 1991.
21  *
22  *  This program is distributed in the hope that it will be useful, but
23  *  WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
24  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the terms and
25  *  conditions of the GNU General Public License for more details.
26  *
27  *  You should have received a copy of the GNU General Public License along
28  *  with this program; if not, write to the Free Software Foundation, Inc.,
29  *  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
30 \*****************************************************************************/
31
32 #ifndef OPTS_H
33 #define OPTS_H
34
35 #include "common.h"
36
37 typedef enum
38  { NVRAMTOOL_OP_SHOW_VERSION = 0,
39    NVRAMTOOL_OP_SHOW_USAGE,
40    NVRAMTOOL_OP_LBTABLE_SHOW_INFO,
41    NVRAMTOOL_OP_LBTABLE_DUMP,
42    NVRAMTOOL_OP_SHOW_PARAM_VALUES,
43    NVRAMTOOL_OP_CMOS_SHOW_ONE_PARAM,
44    NVRAMTOOL_OP_CMOS_SHOW_ALL_PARAMS,
45    NVRAMTOOL_OP_CMOS_SET_ONE_PARAM,
46    NVRAMTOOL_OP_CMOS_SET_PARAMS_STDIN,
47    NVRAMTOOL_OP_CMOS_SET_PARAMS_FILE,
48    NVRAMTOOL_OP_CMOS_CHECKSUM,
49    NVRAMTOOL_OP_SHOW_LAYOUT,
50    NVRAMTOOL_OP_WRITE_CMOS_DUMP,
51    NVRAMTOOL_OP_READ_CMOS_DUMP,
52    NVRAMTOOL_OP_SHOW_CMOS_HEX_DUMP,
53    NVRAMTOOL_OP_SHOW_CMOS_DUMPFILE
54  }
55 nvramtool_op_t;
56
57 typedef struct
58  { nvramtool_op_t op;
59    char *param;
60  }
61 nvramtool_op_info_t;
62
63 typedef enum
64  { NVRAMTOOL_MOD_SHOW_VALUE_ONLY = 0,
65    NVRAMTOOL_MOD_USE_CMOS_LAYOUT_FILE,
66    NVRAMTOOL_MOD_USE_CMOS_OPT_TABLE,
67    NVRAMTOOL_NUM_OP_MODIFIERS  /* must always be last */
68  }
69 nvramtool_op_modifier_t;
70
71 typedef struct
72  { int found;
73    int found_seq;
74    char *param;
75  }
76 nvramtool_op_modifier_info_t;
77
78 extern nvramtool_op_info_t nvramtool_op;
79
80 extern nvramtool_op_modifier_info_t nvramtool_op_modifiers[];
81
82 void parse_nvramtool_args (int argc, char *argv[]);
83
84 #endif  /* OPTS_H */