summaryrefslogtreecommitdiff
path: root/usr/src/cmd/eeprom/i386/benv.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/eeprom/i386/benv.c')
-rw-r--r--usr/src/cmd/eeprom/i386/benv.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/src/cmd/eeprom/i386/benv.c b/usr/src/cmd/eeprom/i386/benv.c
index 2119bdc3af..2e559f83d3 100644
--- a/usr/src/cmd/eeprom/i386/benv.c
+++ b/usr/src/cmd/eeprom/i386/benv.c
@@ -934,12 +934,13 @@ main(int argc, char **argv)
argc -= optind;
argv += optind;
+ optind = 0;
if (bootenv) {
int rv = 0;
if (argc == 1)
- value = argv[0];
+ value = argv[optind];
if (bootenv_print)
return (lzbe_bootenv_print(name, nvlist, stdout));
@@ -978,7 +979,7 @@ main(int argc, char **argv)
if (optind >= argc) {
print_vars(elist);
return (0);
- } else
+ } else {
while (optind < argc) {
/*
* If "-" specified, read variables from stdin;
@@ -996,6 +997,7 @@ main(int argc, char **argv)
optind++;
}
+ }
/*
* don't write benv if we are processing delayed writes since