blob: 07a43575b71b6be93b90e02959209238ca9f4156 [file] [log] [blame]
Stefan Reinauer6540ae52007-07-12 16:35:42 +00001/*****************************************************************************\
2 * input_file.h
3 * $Id: input_file.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 David S. 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_INPUT_FILE_H
33#define LXBIOS_INPUT_FILE_H
34
35#include "common.h"
36
37typedef struct cmos_write_t cmos_write_t;
38
39/* This represents a pending CMOS write operation. When changing multiple
40 * CMOS parameter values, we first represent the changes as a list of pending
41 * write operations. This allows us to sanity check all write operations
42 * before any of them are performed.
43 */
44struct cmos_write_t
45 { unsigned bit;
46 unsigned length;
47 unsigned long long value;
48 cmos_write_t *next;
49 };
50
51cmos_write_t * process_input_file (FILE *f);
52void do_cmos_writes (cmos_write_t *list);
53
54extern const char assignment_regex[];
55
56#endif /* LXBIOS_INPUT_FILE_H */