diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2008-03-01 19:06:32 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2008-03-01 19:06:32 +0000 |
commit | 6e565947a554b9145ae5afdc307a6b842bc09883 (patch) | |
tree | 1063717ec48d42bf238cc0241e64495042706af9 | |
parent | eec5ff4ccb48a640e8a289f1faabee4ff2587005 (diff) | |
download | coreboot-6e565947a554b9145ae5afdc307a6b842bc09883.tar.xz |
Rename lxbios to nvramtool.
This is step 1 in a three-step commit:
1. Apply patch, commit.
2. Rename some files:
$ svn mv lxbios.c nvramtool.c
$ svn mv lxbios.1 nvramtool.c
$ svn mv lxbios.spec nvramtool.spec
$ svn ci
3. Rename lxbios directory:
$ svn mv lxbios/ nvramtool/
$ svn ci
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3122 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r-- | util/lxbios/DISCLAIMER | 4 | ||||
-rw-r--r-- | util/lxbios/Makefile | 16 | ||||
-rw-r--r-- | util/lxbios/README | 2 | ||||
-rw-r--r-- | util/lxbios/cmos_lowlevel.c | 4 | ||||
-rw-r--r-- | util/lxbios/cmos_lowlevel.h | 10 | ||||
-rw-r--r-- | util/lxbios/cmos_ops.c | 4 | ||||
-rw-r--r-- | util/lxbios/cmos_ops.h | 10 | ||||
-rw-r--r-- | util/lxbios/common.c | 6 | ||||
-rw-r--r-- | util/lxbios/common.h | 10 | ||||
-rw-r--r-- | util/lxbios/input_file.c | 4 | ||||
-rw-r--r-- | util/lxbios/input_file.h | 10 | ||||
-rw-r--r-- | util/lxbios/layout.c | 4 | ||||
-rw-r--r-- | util/lxbios/layout.h | 10 | ||||
-rw-r--r-- | util/lxbios/layout_file.c | 4 | ||||
-rw-r--r-- | util/lxbios/layout_file.h | 10 | ||||
-rw-r--r-- | util/lxbios/lbtable.c | 4 | ||||
-rw-r--r-- | util/lxbios/lbtable.h | 10 | ||||
-rw-r--r-- | util/lxbios/lxbios.1 | 48 | ||||
-rw-r--r-- | util/lxbios/lxbios.c | 50 | ||||
-rw-r--r-- | util/lxbios/lxbios.spec | 14 | ||||
-rw-r--r-- | util/lxbios/opts.c | 90 | ||||
-rw-r--r-- | util/lxbios/opts.h | 66 | ||||
-rw-r--r-- | util/lxbios/reg_expr.c | 4 | ||||
-rw-r--r-- | util/lxbios/reg_expr.h | 10 |
24 files changed, 202 insertions, 202 deletions
diff --git a/util/lxbios/DISCLAIMER b/util/lxbios/DISCLAIMER index b8ef55ec5e..28a447581c 100644 --- a/util/lxbios/DISCLAIMER +++ b/util/lxbios/DISCLAIMER @@ -8,9 +8,9 @@ Written by David S. Peterson <dsp@llnl.gov>. UCRL-CODE-2003-012 All rights reserved. -This file is part of lxbios, a utility for reading/writing coreboot +This file is part of nvramtool, a utility for reading/writing coreboot parameters and displaying information from the coreboot table. -For details, see http://coreboot.org/Lxbios. +For details, see http://coreboot.org/nvramtool. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (as published by the diff --git a/util/lxbios/Makefile b/util/lxbios/Makefile index 068f6e8470..5d9ddc0619 100644 --- a/util/lxbios/Makefile +++ b/util/lxbios/Makefile @@ -1,28 +1,28 @@ # $Id$ -PROJECT = lxbios +PROJECT = nvramtool CC = gcc CFLAGS = -O2 -W -Wall LDFLAGS = OBJS = common.o compute_ip_checksum.o hexdump.o cmos_lowlevel.o \ reg_expr.o layout.o layout_file.o lbtable.o cmos_ops.o input_file.o \ - opts.o lxbios.o + opts.o nvramtool.o HEADERS = common.h ip_checksum.h coreboot_tables.h hexdump.h \ cmos_lowlevel.h reg_expr.h layout.h layout_file.h lbtable.h \ cmos_ops.h input_file.h opts.h -all: lxbios man +all: nvramtool man -lxbios: $(OBJS) +nvramtool: $(OBJS) $(CC) $(LDFLAGS) -o $@ $(OBJS) -man: lxbios.1.gz +man: nvramtool.1.gz $(OBJS): $(HEADERS) -lxbios.1.gz: lxbios.1 - gzip -c --best lxbios.1 > lxbios.1.gz +nvramtool.1.gz: nvramtool.1 + gzip -c --best nvramtool.1 > nvramtool.1.gz clean: - rm -f *.o lxbios lxbios.1.gz + rm -f *.o nvramtool nvramtool.1.gz diff --git a/util/lxbios/README b/util/lxbios/README index ccf8118c9a..976bcb02a3 100644 --- a/util/lxbios/README +++ b/util/lxbios/README @@ -2,7 +2,7 @@ $Id$ Summary of Operation -------------------- -lxbios is a utility for reading/writing coreboot parameters and +nvramtool is a utility for reading/writing coreboot parameters and displaying information from the coreboot table. It is intended for x86-based systems (both 32-bit and 64-bit) that use coreboot. diff --git a/util/lxbios/cmos_lowlevel.c b/util/lxbios/cmos_lowlevel.c index f03e3623b3..ab116797a2 100644 --- a/util/lxbios/cmos_lowlevel.c +++ b/util/lxbios/cmos_lowlevel.c @@ -8,9 +8,9 @@ * UCRL-CODE-2003-012 * All rights reserved. * - * This file is part of lxbios, a utility for reading/writing coreboot + * This file is part of nvramtool, a utility for reading/writing coreboot * parameters and displaying information from the coreboot table. - * For details, see http://coreboot.org/Lxbios. + * For details, see http://coreboot.org/nvramtool. * * Please also read the file DISCLAIMER which is included in this software * distribution. diff --git a/util/lxbios/cmos_lowlevel.h b/util/lxbios/cmos_lowlevel.h index 542f11c4ad..73634e02c9 100644 --- a/util/lxbios/cmos_lowlevel.h +++ b/util/lxbios/cmos_lowlevel.h @@ -8,9 +8,9 @@ * UCRL-CODE-2003-012 * All rights reserved. * - * This file is part of lxbios, a utility for reading/writing coreboot + * This file is part of nvramtool, a utility for reading/writing coreboot * parameters and displaying information from the coreboot table. - * For details, see http://coreboot.org/Lxbios. + * For details, see http://coreboot.org/nvramtool. * * Please also read the file DISCLAIMER which is included in this software * distribution. @@ -29,8 +29,8 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. \*****************************************************************************/ -#ifndef LXBIOS_CMOS_LOWLEVEL_H -#define LXBIOS_CMOS_LOWLEVEL_H +#ifndef NVRAMTOOL_CMOS_LOWLEVEL_H +#define NVRAMTOOL_CMOS_LOWLEVEL_H #include "common.h" @@ -59,4 +59,4 @@ int verify_cmos_op (unsigned bit, unsigned length); static inline int verify_cmos_byte_index (unsigned index) { return (index < CMOS_RTC_AREA_SIZE) || (index >= CMOS_SIZE); } -#endif /* LXBIOS_CMOS_LOWLEVEL_H */ +#endif /* NVRAMTOOL_CMOS_LOWLEVEL_H */ diff --git a/util/lxbios/cmos_ops.c b/util/lxbios/cmos_ops.c index 68beb4d11d..170e944678 100644 --- a/util/lxbios/cmos_ops.c +++ b/util/lxbios/cmos_ops.c @@ -8,9 +8,9 @@ * UCRL-CODE-2003-012 * All rights reserved. * - * This file is part of lxbios, a utility for reading/writing coreboot + * This file is part of nvramtool, a utility for reading/writing coreboot * parameters and displaying information from the coreboot table. - * For details, see http://coreboot.org/Lxbios. + * For details, see http://coreboot.org/nvramtool. * * Please also read the file DISCLAIMER which is included in this software * distribution. diff --git a/util/lxbios/cmos_ops.h b/util/lxbios/cmos_ops.h index bebd01178e..ea74333682 100644 --- a/util/lxbios/cmos_ops.h +++ b/util/lxbios/cmos_ops.h @@ -8,9 +8,9 @@ * UCRL-CODE-2003-012 * All rights reserved. * - * This file is part of lxbios, a utility for reading/writing coreboot + * This file is part of nvramtool, a utility for reading/writing coreboot * parameters and displaying information from the coreboot table. - * For details, see http://coreboot.org/Lxbios. + * For details, see http://coreboot.org/nvramtool. * * Please also read the file DISCLAIMER which is included in this software * distribution. @@ -29,8 +29,8 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. \*****************************************************************************/ -#ifndef LXBIOS_CMOS_OPS_H -#define LXBIOS_CMOS_OPS_H +#ifndef CMOS_OPS_H +#define CMOS_OPS_H #include "common.h" #include "layout.h" @@ -50,4 +50,4 @@ void cmos_checksum_write (uint16_t checksum); uint16_t cmos_checksum_compute (void); void cmos_checksum_verify (void); -#endif /* LXBIOS_CMOS_OPS_H */ +#endif /* CMOS_OPS_H */ diff --git a/util/lxbios/common.c b/util/lxbios/common.c index 71018a7a24..cb9e9c817b 100644 --- a/util/lxbios/common.c +++ b/util/lxbios/common.c @@ -8,9 +8,9 @@ * UCRL-CODE-2003-012 * All rights reserved. * - * This file is part of lxbios, a utility for reading/writing coreboot + * This file is part of nvramtool, a utility for reading/writing coreboot * parameters and displaying information from the coreboot table. - * For details, see http://coreboot.org/Lxbios. + * For details, see http://coreboot.org/nvramtool. * * Please also read the file DISCLAIMER which is included in this software * distribution. @@ -32,7 +32,7 @@ #include "common.h" /* basename of this program, as reported by argv[0] */ -const char prog_name[] = "lxbios"; +const char prog_name[] = "nvramtool"; /* version of this program */ const char prog_version[] = "2.0.1"; diff --git a/util/lxbios/common.h b/util/lxbios/common.h index 50b114bdda..5b479c0c40 100644 --- a/util/lxbios/common.h +++ b/util/lxbios/common.h @@ -8,9 +8,9 @@ * UCRL-CODE-2003-012 * All rights reserved. * - * This file is part of lxbios, a utility for reading/writing coreboot + * This file is part of nvramtool, a utility for reading/writing coreboot * parameters and displaying information from the coreboot table. - * For details, see http://coreboot.org/Lxbios. + * For details, see http://coreboot.org/nvramtool. * * Please also read the file DISCLAIMER which is included in this software * distribution. @@ -29,8 +29,8 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. \*****************************************************************************/ -#ifndef LXBIOS_COMMON_H -#define LXBIOS_COMMON_H +#ifndef COMMON_H +#define COMMON_H #include <sys/types.h> #include <sys/stat.h> @@ -69,4 +69,4 @@ int get_line_from_file (FILE *f, char line[], int line_buf_size); void out_of_memory (void); void usage (FILE *outfile); -#endif /* LXBIOS_COMMON_H */ +#endif /* COMMON_H */ diff --git a/util/lxbios/input_file.c b/util/lxbios/input_file.c index d23828c5e7..eafea4ca02 100644 --- a/util/lxbios/input_file.c +++ b/util/lxbios/input_file.c @@ -8,9 +8,9 @@ * UCRL-CODE-2003-012 * All rights reserved. * - * This file is part of lxbios, a utility for reading/writing coreboot + * This file is part of nvramtool, a utility for reading/writing coreboot * parameters and displaying information from the coreboot table. - * For details, see http://coreboot.org/Lxbios. + * For details, see http://coreboot.org/nvramtool. * * Please also read the file DISCLAIMER which is included in this software * distribution. diff --git a/util/lxbios/input_file.h b/util/lxbios/input_file.h index eeb0a568cc..5d4764c08b 100644 --- a/util/lxbios/input_file.h +++ b/util/lxbios/input_file.h @@ -8,9 +8,9 @@ * UCRL-CODE-2003-012 * All rights reserved. * - * This file is part of lxbios, a utility for reading/writing coreboot + * This file is part of nvramtool, a utility for reading/writing coreboot * parameters and displaying information from the coreboot table. - * For details, see http://coreboot.org/Lxbios. + * For details, see http://coreboot.org/nvramtool. * * Please also read the file DISCLAIMER which is included in this software * distribution. @@ -29,8 +29,8 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. \*****************************************************************************/ -#ifndef LXBIOS_INPUT_FILE_H -#define LXBIOS_INPUT_FILE_H +#ifndef INPUT_FILE_H +#define INPUT_FILE_H #include "common.h" @@ -53,4 +53,4 @@ void do_cmos_writes (cmos_write_t *list); extern const char assignment_regex[]; -#endif /* LXBIOS_INPUT_FILE_H */ +#endif /* INPUT_FILE_H */ diff --git a/util/lxbios/layout.c b/util/lxbios/layout.c index 6d18fc7988..6e47521c47 100644 --- a/util/lxbios/layout.c +++ b/util/lxbios/layout.c @@ -8,9 +8,9 @@ * UCRL-CODE-2003-012 * All rights reserved. * - * This file is part of lxbios, a utility for reading/writing coreboot + * This file is part of nvramtool, a utility for reading/writing coreboot * parameters and displaying information from the coreboot table. - * For details, see http://coreboot.org/Lxbios. + * For details, see http://coreboot.org/nvramtool. * * Please also read the file DISCLAIMER which is included in this software * distribution. diff --git a/util/lxbios/layout.h b/util/lxbios/layout.h index 81025cb619..94beb12c4b 100644 --- a/util/lxbios/layout.h +++ b/util/lxbios/layout.h @@ -8,9 +8,9 @@ * UCRL-CODE-2003-012 * All rights reserved. * - * This file is part of lxbios, a utility for reading/writing coreboot + * This file is part of nvramtool, a utility for reading/writing coreboot * parameters and displaying information from the coreboot table. - * For details, see http://coreboot.org/Lxbios. + * For details, see http://coreboot.org/nvramtool. * * Please also read the file DISCLAIMER which is included in this software * distribution. @@ -29,8 +29,8 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. \*****************************************************************************/ -#ifndef LXBIOS_LAYOUT_H -#define LXBIOS_LAYOUT_H +#ifndef LAYOUT_H +#define LAYOUT_H #include "common.h" #include "coreboot_tables.h" @@ -111,4 +111,4 @@ int is_checksum_name (const char name[]); int checksum_layout_to_bytes (cmos_checksum_layout_t *layout); void checksum_layout_to_bits (cmos_checksum_layout_t *layout); -#endif /* LXBIOS_LAYOUT_H */ +#endif /* LAYOUT_H */ diff --git a/util/lxbios/layout_file.c b/util/lxbios/layout_file.c index 81d2df6925..4e6b12d51b 100644 --- a/util/lxbios/layout_file.c +++ b/util/lxbios/layout_file.c @@ -8,9 +8,9 @@ * UCRL-CODE-2003-012 * All rights reserved. * - * This file is part of lxbios, a utility for reading/writing coreboot + * This file is part of nvramtool, a utility for reading/writing coreboot * parameters and displaying information from the coreboot table. - * For details, see http://coreboot.org/Lxbios. + * For details, see http://coreboot.org/nvramtool. * * Please also read the file DISCLAIMER which is included in this software * distribution. diff --git a/util/lxbios/layout_file.h b/util/lxbios/layout_file.h index d9cc9887b4..3f4f3faf65 100644 --- a/util/lxbios/layout_file.h +++ b/util/lxbios/layout_file.h @@ -8,9 +8,9 @@ * UCRL-CODE-2003-012 * All rights reserved. * - * This file is part of lxbios, a utility for reading/writing coreboot + * This file is part of nvramtool, a utility for reading/writing coreboot * parameters and displaying information from the coreboot table. - * For details, see http://coreboot.org/Lxbios. + * For details, see http://coreboot.org/nvramtool. * * Please also read the file DISCLAIMER which is included in this software * distribution. @@ -29,8 +29,8 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. \*****************************************************************************/ -#ifndef LXBIOS_LAYOUT_FILE_H -#define LXBIOS_LAYOUT_FILE_H +#ifndef LAYOUT_FILE_H +#define LAYOUT_FILE_H #include "common.h" #include "coreboot_tables.h" @@ -39,4 +39,4 @@ void set_layout_filename (const char filename[]); void get_layout_from_file (void); void write_cmos_layout (FILE *f); -#endif /* LXBIOS_LAYOUT_FILE_H */ +#endif /* LAYOUT_FILE_H */ diff --git a/util/lxbios/lbtable.c b/util/lxbios/lbtable.c index 87f0356186..ec2cc8545d 100644 --- a/util/lxbios/lbtable.c +++ b/util/lxbios/lbtable.c @@ -9,9 +9,9 @@ * UCRL-CODE-2003-012 * All rights reserved. * - * This file is part of lxbios, a utility for reading/writing coreboot + * This file is part of nvramtool, a utility for reading/writing coreboot * parameters and displaying information from the coreboot table. - * For details, see http://coreboot.org/Lxbios. + * For details, see http://coreboot.org/nvramtool. * * Please also read the file DISCLAIMER which is included in this software * distribution. diff --git a/util/lxbios/lbtable.h b/util/lxbios/lbtable.h index 4cc2d33307..f632f1a956 100644 --- a/util/lxbios/lbtable.h +++ b/util/lxbios/lbtable.h @@ -8,9 +8,9 @@ * UCRL-CODE-2003-012 * All rights reserved. * - * This file is part of lxbios, a utility for reading/writing coreboot + * This file is part of nvramtool, a utility for reading/writing coreboot * parameters and displaying information from the coreboot table. - * For details, see http://coreboot.org/Lxbios. + * For details, see http://coreboot.org/nvramtool. * * Please also read the file DISCLAIMER which is included in this software * distribution. @@ -29,8 +29,8 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. \*****************************************************************************/ -#ifndef LXBIOS_LBTABLE_H -#define LXBIOS_LBTABLE_H +#ifndef LBTABLE_H +#define LBTABLE_H #include "common.h" @@ -40,4 +40,4 @@ void dump_lbtable (void); void list_lbtable_choices (void); void list_lbtable_item (const char item[]); -#endif /* LXBIOS_LBTABLE_H */ +#endif /* LBTABLE_H */ diff --git a/util/lxbios/lxbios.1 b/util/lxbios/lxbios.1 index 63a0fe2706..95f25b4480 100644 --- a/util/lxbios/lxbios.1 +++ b/util/lxbios/lxbios.1 @@ -1,5 +1,5 @@ .\"***************************************************************************\ -.\" lxbios.1 +.\" nvramtool.1 .\" $Id$ .\"*************************************************************************** .\" Copyright (C) 2002, 2003 The Regents of the University of California. @@ -8,9 +8,9 @@ .\" UCRL-CODE-2003-012 .\" All rights reserved. .\" -.\" This file is part of lxbios, a utility for reading/writing coreboot +.\" This file is part of nvramtool, a utility for reading/writing coreboot .\" parameters and displaying information from the coreboot table. -.\" For details, see http://coreboot.org/Lxbios. +.\" For details, see http://coreboot.org/nvramtool. .\" .\" Please also read the file DISCLAIMER which is included in this software .\" distribution. @@ -28,43 +28,43 @@ .\" with this program; if not, write to the Free Software Foundation, Inc., .\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. .\"***************************************************************************/ -.TH LXBIOS 1 "January 2008" Linux +.TH NVRAMTOOL 1 "January 2008" Linux .SH NAME -lxbios \- read/write coreboot-related information +nvramtool \- read/write coreboot-related information .SH SYNOPSIS -.B "lxbios [OPTS] [-n] -r NAME" +.B "nvramtool [OPTS] [-n] -r NAME" .br -.B "lxbios [OPTS] -e NAME" +.B "nvramtool [OPTS] -e NAME" .br -.B "lxbios [OPTS] -a" +.B "nvramtool [OPTS] -a" .br -.B "lxbios [OPTS] -w NAME=VALUE" +.B "nvramtool [OPTS] -w NAME=VALUE" .br -.B "lxbios [OPTS] -p INPUT_FILE" +.B "nvramtool [OPTS] -p INPUT_FILE" .br -.B "lxbios [OPTS] -i" +.B "nvramtool [OPTS] -i" .br -.B "lxbios [OPTS] -c [VALUE]" +.B "nvramtool [OPTS] -c [VALUE]" .br -.B "lxbios [OPTS] -l [ARG]" +.B "nvramtool [OPTS] -l [ARG]" .br -.B "lxbios [OPTS] -d" +.B "nvramtool [OPTS] -d" .br -.B "lxbios [OPTS] -Y" +.B "nvramtool [OPTS] -Y" .br -.B "lxbios [OPTS] -b OUTPUT_FILE" +.B "nvramtool [OPTS] -b OUTPUT_FILE" .br -.B "lxbios [OPTS] -B INPUT_FILE" +.B "nvramtool [OPTS] -B INPUT_FILE" .br -.B "lxbios [OPTS] -x" +.B "nvramtool [OPTS] -x" .br -.B "lxbios [OPTS] -X DUMPFILE" +.B "nvramtool [OPTS] -X DUMPFILE" .br -.B "lxbios [OPTS] -v" +.B "nvramtool [OPTS] -v" .br -.B "lxbios [OPTS] -h" +.B "nvramtool [OPTS] -h" .SH DESCRIPTION -.B "lxbios" +.B "nvramtool" is a utility for reading/writing coreboot parameters and displaying information from the coreboot table. @@ -180,11 +180,11 @@ evaluates to the following: The .B "'-y LAYOUT_FILE'" -option tells lxbios to obtain CMOS layout information from the contents of +option tells nvramtool to obtain CMOS layout information from the contents of .B "LAYOUT_FILE." Likewise, the .B "'-t'" -option tells lxbios to obtain CMOS layout information from the CMOS option +option tells nvramtool to obtain CMOS layout information from the CMOS option table (contained within the coreboot table). If neither option is specified, the CMOS option table is used by default. .B "LAYOUT_FILE" diff --git a/util/lxbios/lxbios.c b/util/lxbios/lxbios.c index a13ceb1480..98de6dc929 100644 --- a/util/lxbios/lxbios.c +++ b/util/lxbios/lxbios.c @@ -1,5 +1,5 @@ /*****************************************************************************\ - * lxbios.c + * nvramtool.c * $Id$ ***************************************************************************** * Copyright (C) 2002-2005 The Regents of the University of California. @@ -8,9 +8,9 @@ * UCRL-CODE-2003-012 * All rights reserved. * - * This file is part of lxbios, a utility for reading/writing coreboot + * This file is part of nvramtool, a utility for reading/writing coreboot * parameters and displaying information from the coreboot table. - * For details, see http://coreboot.org/Lxbios. + * For details, see http://coreboot.org/nvramtool. * * Please also read the file DISCLAIMER which is included in this software * distribution. @@ -96,18 +96,18 @@ static const hexdump_format_t cmos_dump_format = int main (int argc, char *argv[]) { cmos_layout_get_fn_t fn; - parse_lxbios_args(argc, argv); + parse_nvramtool_args(argc, argv); - if (lxbios_op_modifiers[LXBIOS_MOD_USE_CMOS_LAYOUT_FILE].found) + if (nvramtool_op_modifiers[NVRAMTOOL_MOD_USE_CMOS_LAYOUT_FILE].found) { set_layout_filename( - lxbios_op_modifiers[LXBIOS_MOD_USE_CMOS_LAYOUT_FILE].param); + nvramtool_op_modifiers[NVRAMTOOL_MOD_USE_CMOS_LAYOUT_FILE].param); fn = get_layout_from_file; } else fn = get_layout_from_cmos_table; register_cmos_layout_get_fn(fn); - op_fns[lxbios_op.op](); + op_fns[nvramtool_op.op](); return 0; } @@ -140,11 +140,11 @@ static void op_show_usage (void) * Else show all possible values for ARG. ****************************************************************************/ static void op_lbtable_show_info (void) - { if (lxbios_op.param == NULL) + { if (nvramtool_op.param == NULL) list_lbtable_choices(); else { get_lbtable(); - list_lbtable_item(lxbios_op.param); + list_lbtable_item(nvramtool_op.param); } } @@ -169,7 +169,7 @@ static void op_lbtable_dump (void) ****************************************************************************/ static void op_show_param_values (void) { get_cmos_layout(); - list_param_enums(lxbios_op.param); + list_param_enums(nvramtool_op.param); } /**************************************************************************** @@ -184,8 +184,8 @@ static void op_cmos_show_one_param (void) { int result; get_cmos_layout(); - result = list_one_param(lxbios_op.param, - !lxbios_op_modifiers[LXBIOS_MOD_SHOW_VALUE_ONLY].found); + result = list_one_param(nvramtool_op.param, + !nvramtool_op_modifiers[NVRAMTOOL_MOD_SHOW_VALUE_ONLY].found); cmos_checksum_verify(); if (result) @@ -225,7 +225,7 @@ static void op_cmos_set_one_param (void) /* Separate 'NAME=VALUE' syntax into two strings representing NAME and * VALUE. */ - parse_assignment(lxbios_op.param, &name, &value); + parse_assignment(nvramtool_op.param, &name, &value); set_one_param(name, value); } @@ -252,9 +252,9 @@ static void op_cmos_set_params_stdin (void) static void op_cmos_set_params_file (void) { FILE *f; - if ((f = fopen(lxbios_op.param, "r")) == NULL) + if ((f = fopen(nvramtool_op.param, "r")) == NULL) { fprintf(stderr, "%s: Can not open file %s for reading: %s\n", - prog_name, lxbios_op.param, strerror(errno)); + prog_name, nvramtool_op.param, strerror(errno)); exit(1); } @@ -276,14 +276,14 @@ static void op_cmos_checksum (void) get_cmos_layout(); - if (lxbios_op.param == NULL) + if (nvramtool_op.param == NULL) { set_iopl(3); checksum = cmos_checksum_read(); set_iopl(0); printf("0x%x\n", checksum); } else - { checksum = convert_checksum_value(lxbios_op.param); + { checksum = convert_checksum_value(nvramtool_op.param); set_iopl(3); cmos_checksum_write(checksum); set_iopl(0); @@ -313,9 +313,9 @@ static void op_write_cmos_dump (void) { unsigned char data[CMOS_SIZE]; FILE *f; - if ((f = fopen(lxbios_op.param, "w")) == NULL) + if ((f = fopen(nvramtool_op.param, "w")) == NULL) { fprintf(stderr, "%s: Can not open file %s for writing: %s\n", - prog_name, lxbios_op.param, strerror(errno)); + prog_name, nvramtool_op.param, strerror(errno)); exit(1); } @@ -325,7 +325,7 @@ static void op_write_cmos_dump (void) if (fwrite(data, 1, CMOS_SIZE, f) != CMOS_SIZE) { fprintf(stderr, "%s: Error writing CMOS data to file %s: %s\n", - prog_name, lxbios_op.param, strerror(errno)); + prog_name, nvramtool_op.param, strerror(errno)); exit(1); } @@ -344,16 +344,16 @@ static void op_read_cmos_dump (void) size_t nr_bytes; FILE *f; - if ((f = fopen(lxbios_op.param, "r")) == NULL) + if ((f = fopen(nvramtool_op.param, "r")) == NULL) { fprintf(stderr, "%s: Can not open file %s for reading: %s\n", - prog_name, lxbios_op.param, strerror(errno)); + prog_name, nvramtool_op.param, strerror(errno)); exit(1); } if ((nr_bytes = fread(data, 1, CMOS_SIZE, f)) != CMOS_SIZE) { fprintf(stderr, "%s: Error: Only able to read %d bytes of CMOS data " "from file %s. CMOS data is unchanged.\n", prog_name, - (int) nr_bytes, lxbios_op.param); + (int) nr_bytes, nvramtool_op.param); exit(1); } @@ -392,9 +392,9 @@ static void op_show_cmos_dumpfile (void) size_t nr_bytes; FILE *f; - if ((f = fopen(lxbios_op.param, "r")) == NULL) + if ((f = fopen(nvramtool_op.param, "r")) == NULL) { fprintf(stderr, "%s: Can not open file %s for reading: %s\n", - prog_name, lxbios_op.param, strerror(errno)); + prog_name, nvramtool_op.param, strerror(errno)); exit(1); } diff --git a/util/lxbios/lxbios.spec b/util/lxbios/lxbios.spec index bb66e9b382..1493604dca 100644 --- a/util/lxbios/lxbios.spec +++ b/util/lxbios/lxbios.spec @@ -2,21 +2,21 @@ # $Id$ ## -Name: lxbios +Name: nvramtool Version: 2.0.1 Release: 0 Summary: coreboot utility program Group: System Environment/Base License: GPL -Provides: lxbios +Provides: nvramtool BuildRoot: %{_tmppath}/%{name}-%{version} Source0: %{name}-%{version}.tgz %description -lxbios is a utility for reading/writing coreboot parameters and displaying +nvramtool is a utility for reading/writing coreboot parameters and displaying information from the coreboot table. At boot time, coreboot places a table (known as the coreboot table) in low @@ -36,8 +36,8 @@ make rm -rf "$RPM_BUILD_ROOT" mkdir -p "$RPM_BUILD_ROOT/usr/bin" mkdir -p "$RPM_BUILD_ROOT/usr/man/man1" -cp lxbios "$RPM_BUILD_ROOT/usr/bin" -cp lxbios.1.gz $RPM_BUILD_ROOT/usr/man/man1 +cp nvramtool "$RPM_BUILD_ROOT/usr/bin" +cp nvramtool.1.gz $RPM_BUILD_ROOT/usr/man/man1 %clean rm -rf "$RPM_BUILD_ROOT" @@ -46,5 +46,5 @@ rm -rf "$RPM_BUILD_ROOT" %defattr(-,root,root,0755) %doc ChangeLog README %doc README -/usr/bin/lxbios -/usr/man/man1/lxbios.1.gz +/usr/bin/nvramtool +/usr/man/man1/nvramtool.1.gz diff --git a/util/lxbios/opts.c b/util/lxbios/opts.c index a140d15971..3431153179 100644 --- a/util/lxbios/opts.c +++ b/util/lxbios/opts.c @@ -8,9 +8,9 @@ * UCRL-CODE-2003-012 * All rights reserved. * - * This file is part of lxbios, a utility for reading/writing coreboot + * This file is part of nvramtool, a utility for reading/writing coreboot * parameters and displaying information from the coreboot table. - * For details, see http://coreboot.org/Lxbios. + * For details, see http://coreboot.org/nvramtool. * * Please also read the file DISCLAIMER which is included in this software * distribution. @@ -32,30 +32,30 @@ #include "common.h" #include "opts.h" -lxbios_op_info_t lxbios_op; +nvramtool_op_info_t nvramtool_op; -lxbios_op_modifier_info_t lxbios_op_modifiers[LXBIOS_NUM_OP_MODIFIERS]; +nvramtool_op_modifier_info_t nvramtool_op_modifiers[NVRAMTOOL_NUM_OP_MODIFIERS]; static char * handle_optional_arg (int argc, char *argv[]); -static void register_op (int *op_found, lxbios_op_t op, char op_param[]); -static void register_op_modifier (lxbios_op_modifier_t mod, char mod_param[]); +static void register_op (int *op_found, nvramtool_op_t op, char op_param[]); +static void register_op_modifier (nvramtool_op_modifier_t mod, char mod_param[]); static void resolve_op_modifiers (void); static void sanity_check_args (void); static const char getopt_string[] = "-ab:B:c::de:hil::np:r:tvw:xX:y:Y"; /**************************************************************************** - * parse_lxbios_args + * parse_nvramtool_args * * Parse command line arguments. ****************************************************************************/ -void parse_lxbios_args (int argc, char *argv[]) - { lxbios_op_modifier_info_t *mod_info; +void parse_nvramtool_args (int argc, char *argv[]) + { nvramtool_op_modifier_info_t *mod_info; int i, op_found; char c; - for (i = 0, mod_info = lxbios_op_modifiers; - i < LXBIOS_NUM_OP_MODIFIERS; + for (i = 0, mod_info = nvramtool_op_modifiers; + i < NVRAMTOOL_NUM_OP_MODIFIERS; i++, mod_info++) { mod_info->found = FALSE; mod_info->found_seq = 0; @@ -68,63 +68,63 @@ void parse_lxbios_args (int argc, char *argv[]) do { switch (c = getopt(argc, argv, getopt_string)) { case 'a': - register_op(&op_found, LXBIOS_OP_CMOS_SHOW_ALL_PARAMS, NULL); + register_op(&op_found, NVRAMTOOL_OP_CMOS_SHOW_ALL_PARAMS, NULL); break; case 'b': - register_op(&op_found, LXBIOS_OP_WRITE_CMOS_DUMP, optarg); + register_op(&op_found, NVRAMTOOL_OP_WRITE_CMOS_DUMP, optarg); break; case 'B': - register_op(&op_found, LXBIOS_OP_READ_CMOS_DUMP, optarg); + register_op(&op_found, NVRAMTOOL_OP_READ_CMOS_DUMP, optarg); break; case 'c': - register_op(&op_found, LXBIOS_OP_CMOS_CHECKSUM, + register_op(&op_found, NVRAMTOOL_OP_CMOS_CHECKSUM, handle_optional_arg(argc, argv)); break; case 'd': - register_op(&op_found, LXBIOS_OP_LBTABLE_DUMP, NULL); + register_op(&op_found, NVRAMTOOL_OP_LBTABLE_DUMP, NULL); break; case 'e': - register_op(&op_found, LXBIOS_OP_SHOW_PARAM_VALUES, optarg); + register_op(&op_found, NVRAMTOOL_OP_SHOW_PARAM_VALUES, optarg); break; case 'h': - register_op(&op_found, LXBIOS_OP_SHOW_USAGE, NULL); + register_op(&op_found, NVRAMTOOL_OP_SHOW_USAGE, NULL); break; case 'i': - register_op(&op_found, LXBIOS_OP_CMOS_SET_PARAMS_STDIN, NULL); + register_op(&op_found, NVRAMTOOL_OP_CMOS_SET_PARAMS_STDIN, NULL); break; case 'l': - register_op(&op_found, LXBIOS_OP_LBTABLE_SHOW_INFO, + register_op(&op_found, NVRAMTOOL_OP_LBTABLE_SHOW_INFO, handle_optional_arg(argc, argv)); break; case 'n': - register_op_modifier(LXBIOS_MOD_SHOW_VALUE_ONLY, NULL); + register_op_modifier(NVRAMTOOL_MOD_SHOW_VALUE_ONLY, NULL); break; case 'p': - register_op(&op_found, LXBIOS_OP_CMOS_SET_PARAMS_FILE, optarg); + register_op(&op_found, NVRAMTOOL_OP_CMOS_SET_PARAMS_FILE, optarg); break; case 'r': - register_op(&op_found, LXBIOS_OP_CMOS_SHOW_ONE_PARAM, optarg); + register_op(&op_found, NVRAMTOOL_OP_CMOS_SHOW_ONE_PARAM, optarg); break; case 't': - register_op_modifier(LXBIOS_MOD_USE_CMOS_OPT_TABLE, NULL); + register_op_modifier(NVRAMTOOL_MOD_USE_CMOS_OPT_TABLE, NULL); break; case 'v': - register_op(&op_found, LXBIOS_OP_SHOW_VERSION, NULL); + register_op(&op_found, NVRAMTOOL_OP_SHOW_VERSION, NULL); break; case 'w': - register_op(&op_found, LXBIOS_OP_CMOS_SET_ONE_PARAM, optarg); + register_op(&op_found, NVRAMTOOL_OP_CMOS_SET_ONE_PARAM, optarg); break; case 'x': - register_op(&op_found, LXBIOS_OP_SHOW_CMOS_HEX_DUMP, NULL); + register_op(&op_found, NVRAMTOOL_OP_SHOW_CMOS_HEX_DUMP, NULL); break; case 'X': - register_op(&op_found, LXBIOS_OP_SHOW_CMOS_DUMPFILE, optarg); + register_op(&op_found, NVRAMTOOL_OP_SHOW_CMOS_DUMPFILE, optarg); break; case 'y': - register_op_modifier(LXBIOS_MOD_USE_CMOS_LAYOUT_FILE, optarg); + register_op_modifier(NVRAMTOOL_MOD_USE_CMOS_LAYOUT_FILE, optarg); break; case 'Y': - register_op(&op_found, LXBIOS_OP_SHOW_LAYOUT, NULL); + register_op(&op_found, NVRAMTOOL_OP_SHOW_LAYOUT, NULL); break; case -1: /* no more command line args */ break; @@ -178,13 +178,13 @@ static char * handle_optional_arg (int argc, char *argv[]) * * Store the user's selection of which operation this program should perform. ****************************************************************************/ -static void register_op (int *op_found, lxbios_op_t op, char op_param[]) - { if (*op_found && (op != lxbios_op.op)) +static void register_op (int *op_found, nvramtool_op_t op, char op_param[]) + { if (*op_found && (op != nvramtool_op.op)) usage(stderr); *op_found = TRUE; - lxbios_op.op = op; - lxbios_op.param = op_param; + nvramtool_op.op = op; + nvramtool_op.param = op_param; } /**************************************************************************** @@ -193,11 +193,11 @@ static void register_op (int *op_found, lxbios_op_t op, char op_param[]) * Store information regarding an optional argument specified in addition to * the user's selection of which operation this program should perform. ****************************************************************************/ -static void register_op_modifier (lxbios_op_modifier_t mod, char mod_param[]) +static void register_op_modifier (nvramtool_op_modifier_t mod, char mod_param[]) { static int found_seq = 0; - lxbios_op_modifier_info_t *mod_info; + nvramtool_op_modifier_info_t *mod_info; - mod_info = &lxbios_op_modifiers[mod]; + mod_info = &nvramtool_op_modifiers[mod]; mod_info->found = TRUE; mod_info->found_seq = ++found_seq; mod_info->param = mod_param; @@ -210,13 +210,13 @@ static void register_op_modifier (lxbios_op_modifier_t mod, char mod_param[]) * the last specified argument overrides previous conflicting arguments. ****************************************************************************/ static void resolve_op_modifiers (void) - { if (lxbios_op_modifiers[LXBIOS_MOD_USE_CMOS_LAYOUT_FILE].found && - lxbios_op_modifiers[LXBIOS_MOD_USE_CMOS_OPT_TABLE].found) - { if (lxbios_op_modifiers[LXBIOS_MOD_USE_CMOS_LAYOUT_FILE].found_seq > - lxbios_op_modifiers[LXBIOS_MOD_USE_CMOS_OPT_TABLE].found_seq) - lxbios_op_modifiers[LXBIOS_MOD_USE_CMOS_OPT_TABLE].found = FALSE; + { if (nvramtool_op_modifiers[NVRAMTOOL_MOD_USE_CMOS_LAYOUT_FILE].found && + nvramtool_op_modifiers[NVRAMTOOL_MOD_USE_CMOS_OPT_TABLE].found) + { if (nvramtool_op_modifiers[NVRAMTOOL_MOD_USE_CMOS_LAYOUT_FILE].found_seq > + nvramtool_op_modifiers[NVRAMTOOL_MOD_USE_CMOS_OPT_TABLE].found_seq) + nvramtool_op_modifiers[NVRAMTOOL_MOD_USE_CMOS_OPT_TABLE].found = FALSE; else - lxbios_op_modifiers[LXBIOS_MOD_USE_CMOS_LAYOUT_FILE].found = FALSE; + nvramtool_op_modifiers[NVRAMTOOL_MOD_USE_CMOS_LAYOUT_FILE].found = FALSE; } } @@ -226,7 +226,7 @@ static void resolve_op_modifiers (void) * Perform sanity checking on command line arguments. ****************************************************************************/ static void sanity_check_args (void) - { if ((lxbios_op_modifiers[LXBIOS_MOD_SHOW_VALUE_ONLY].found) && - (lxbios_op.op != LXBIOS_OP_CMOS_SHOW_ONE_PARAM)) + { if ((nvramtool_op_modifiers[NVRAMTOOL_MOD_SHOW_VALUE_ONLY].found) && + (nvramtool_op.op != NVRAMTOOL_OP_CMOS_SHOW_ONE_PARAM)) usage(stderr); } diff --git a/util/lxbios/opts.h b/util/lxbios/opts.h index 6314756cb5..b335b16165 100644 --- a/util/lxbios/opts.h +++ b/util/lxbios/opts.h @@ -8,9 +8,9 @@ * UCRL-CODE-2003-012 * All rights reserved. * - * This file is part of lxbios, a utility for reading/writing coreboot + * This file is part of nvramtool, a utility for reading/writing coreboot * parameters and displaying information from the coreboot table. - * For details, see http://coreboot.org/Lxbios. + * For details, see http://coreboot.org/nvramtool. * * Please also read the file DISCLAIMER which is included in this software * distribution. @@ -29,56 +29,56 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. \*****************************************************************************/ -#ifndef LXBIOS_OPTS_H -#define LXBIOS_OPTS_H +#ifndef OPTS_H +#define OPTS_H #include "common.h" typedef enum - { LXBIOS_OP_SHOW_VERSION = 0, - LXBIOS_OP_SHOW_USAGE, - LXBIOS_OP_LBTABLE_SHOW_INFO, - LXBIOS_OP_LBTABLE_DUMP, - LXBIOS_OP_SHOW_PARAM_VALUES, - LXBIOS_OP_CMOS_SHOW_ONE_PARAM, - LXBIOS_OP_CMOS_SHOW_ALL_PARAMS, - LXBIOS_OP_CMOS_SET_ONE_PARAM, - LXBIOS_OP_CMOS_SET_PARAMS_STDIN, - LXBIOS_OP_CMOS_SET_PARAMS_FILE, - LXBIOS_OP_CMOS_CHECKSUM, - LXBIOS_OP_SHOW_LAYOUT, - LXBIOS_OP_WRITE_CMOS_DUMP, - LXBIOS_OP_READ_CMOS_DUMP, - LXBIOS_OP_SHOW_CMOS_HEX_DUMP, - LXBIOS_OP_SHOW_CMOS_DUMPFILE + { NVRAMTOOL_OP_SHOW_VERSION = 0, + NVRAMTOOL_OP_SHOW_USAGE, + NVRAMTOOL_OP_LBTABLE_SHOW_INFO, + NVRAMTOOL_OP_LBTABLE_DUMP, + NVRAMTOOL_OP_SHOW_PARAM_VALUES, + NVRAMTOOL_OP_CMOS_SHOW_ONE_PARAM, + NVRAMTOOL_OP_CMOS_SHOW_ALL_PARAMS, + NVRAMTOOL_OP_CMOS_SET_ONE_PARAM, + NVRAMTOOL_OP_CMOS_SET_PARAMS_STDIN, + NVRAMTOOL_OP_CMOS_SET_PARAMS_FILE, + NVRAMTOOL_OP_CMOS_CHECKSUM, + NVRAMTOOL_OP_SHOW_LAYOUT, + NVRAMTOOL_OP_WRITE_CMOS_DUMP, + NVRAMTOOL_OP_READ_CMOS_DUMP, + NVRAMTOOL_OP_SHOW_CMOS_HEX_DUMP, + NVRAMTOOL_OP_SHOW_CMOS_DUMPFILE } -lxbios_op_t; +nvramtool_op_t; typedef struct - { lxbios_op_t op; + { nvramtool_op_t op; char *param; } -lxbios_op_info_t; +nvramtool_op_info_t; typedef enum - { LXBIOS_MOD_SHOW_VALUE_ONLY = 0, - LXBIOS_MOD_USE_CMOS_LAYOUT_FILE, - LXBIOS_MOD_USE_CMOS_OPT_TABLE, - LXBIOS_NUM_OP_MODIFIERS /* must always be last */ + { NVRAMTOOL_MOD_SHOW_VALUE_ONLY = 0, + NVRAMTOOL_MOD_USE_CMOS_LAYOUT_FILE, + NVRAMTOOL_MOD_USE_CMOS_OPT_TABLE, + NVRAMTOOL_NUM_OP_MODIFIERS /* must always be last */ } -lxbios_op_modifier_t; +nvramtool_op_modifier_t; typedef struct { int found; int found_seq; char *param; } -lxbios_op_modifier_info_t; +nvramtool_op_modifier_info_t; -extern lxbios_op_info_t lxbios_op; +extern nvramtool_op_info_t nvramtool_op; -extern lxbios_op_modifier_info_t lxbios_op_modifiers[]; +extern nvramtool_op_modifier_info_t nvramtool_op_modifiers[]; -void parse_lxbios_args (int argc, char *argv[]); +void parse_nvramtool_args (int argc, char *argv[]); -#endif /* LXBIOS_OPTS_H */ +#endif /* OPTS_H */ diff --git a/util/lxbios/reg_expr.c b/util/lxbios/reg_expr.c index 8225836b3a..0737866666 100644 --- a/util/lxbios/reg_expr.c +++ b/util/lxbios/reg_expr.c @@ -8,9 +8,9 @@ * UCRL-CODE-2003-012 * All rights reserved. * - * This file is part of lxbios, a utility for reading/writing coreboot + * This file is part of nvramtool, a utility for reading/writing coreboot * parameters and displaying information from the coreboot table. - * For details, see http://coreboot.org/Lxbios. + * For details, see http://coreboot.org/nvramtool. * * Please also read the file DISCLAIMER which is included in this software * distribution. diff --git a/util/lxbios/reg_expr.h b/util/lxbios/reg_expr.h index 2f0058ed04..cf8f8a9b4d 100644 --- a/util/lxbios/reg_expr.h +++ b/util/lxbios/reg_expr.h @@ -8,9 +8,9 @@ * UCRL-CODE-2003-012 * All rights reserved. * - * This file is part of lxbios, a utility for reading/writing coreboot + * This file is part of nvramtool, a utility for reading/writing coreboot * parameters and displaying information from the coreboot table. - * For details, see http://coreboot.org/Lxbios. + * For details, see http://coreboot.org/nvramtool. * * Please also read the file DISCLAIMER which is included in this software * distribution. @@ -29,8 +29,8 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. \*****************************************************************************/ -#ifndef LXBIOS_REG_EXPR_H -#define LXBIOS_REG_EXPR_H +#ifndef REG_EXPR_H +#define REG_EXPR_H #include <regex.h> #include "common.h" @@ -39,4 +39,4 @@ void compile_reg_exprs (int cflags, int num_exprs, /* const char *expr1, regex_t *reg1, */ ...); void free_reg_exprs (int num_exprs, /* regex_t *reg1, */ ...); -#endif /* LXBIOS_REG_EXPR_H */ +#endif /* REG_EXPR_H */ |