Stefan Reinauer | 6540ae5 | 2007-07-12 16:35:42 +0000 | [diff] [blame^] | 1 | /*****************************************************************************\ |
| 2 | * opts.h |
| 3 | * $Id: opts.h,v 1.2 2005/12/16 22:45:49 dsp_llnl Exp $ |
| 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 lxbios, a utility for reading/writing LinuxBIOS |
| 12 | * parameters and displaying information from the LinuxBIOS table. |
| 13 | * For details, see <http://www.llnl.gov/linux/lxbios/>. |
| 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 LXBIOS_OPTS_H |
| 33 | #define LXBIOS_OPTS_H |
| 34 | |
| 35 | #include "common.h" |
| 36 | |
| 37 | typedef enum |
| 38 | { LXBIOS_OP_SHOW_VERSION = 0, |
| 39 | LXBIOS_OP_SHOW_USAGE, |
| 40 | LXBIOS_OP_LBTABLE_SHOW_INFO, |
| 41 | LXBIOS_OP_LBTABLE_DUMP, |
| 42 | LXBIOS_OP_SHOW_PARAM_VALUES, |
| 43 | LXBIOS_OP_CMOS_SHOW_ONE_PARAM, |
| 44 | LXBIOS_OP_CMOS_SHOW_ALL_PARAMS, |
| 45 | LXBIOS_OP_CMOS_SET_ONE_PARAM, |
| 46 | LXBIOS_OP_CMOS_SET_PARAMS_STDIN, |
| 47 | LXBIOS_OP_CMOS_SET_PARAMS_FILE, |
| 48 | LXBIOS_OP_CMOS_CHECKSUM, |
| 49 | LXBIOS_OP_SHOW_LAYOUT, |
| 50 | LXBIOS_OP_WRITE_CMOS_DUMP, |
| 51 | LXBIOS_OP_READ_CMOS_DUMP, |
| 52 | LXBIOS_OP_SHOW_CMOS_HEX_DUMP, |
| 53 | LXBIOS_OP_SHOW_CMOS_DUMPFILE |
| 54 | } |
| 55 | lxbios_op_t; |
| 56 | |
| 57 | typedef struct |
| 58 | { lxbios_op_t op; |
| 59 | char *param; |
| 60 | } |
| 61 | lxbios_op_info_t; |
| 62 | |
| 63 | typedef enum |
| 64 | { LXBIOS_MOD_SHOW_VALUE_ONLY = 0, |
| 65 | LXBIOS_MOD_USE_CMOS_LAYOUT_FILE, |
| 66 | LXBIOS_MOD_USE_CMOS_OPT_TABLE, |
| 67 | LXBIOS_NUM_OP_MODIFIERS /* must always be last */ |
| 68 | } |
| 69 | lxbios_op_modifier_t; |
| 70 | |
| 71 | typedef struct |
| 72 | { int found; |
| 73 | int found_seq; |
| 74 | char *param; |
| 75 | } |
| 76 | lxbios_op_modifier_info_t; |
| 77 | |
| 78 | extern lxbios_op_info_t lxbios_op; |
| 79 | |
| 80 | extern lxbios_op_modifier_info_t lxbios_op_modifiers[]; |
| 81 | |
| 82 | void parse_lxbios_args (int argc, char *argv[]); |
| 83 | |
| 84 | #endif /* LXBIOS_OPTS_H */ |