summaryrefslogtreecommitdiff
path: root/usr/src/cmd/eeprom
diff options
context:
space:
mode:
authorDan McDonald <danmcd@mnx.io>2022-07-14 20:42:22 -0400
committerDan McDonald <danmcd@mnx.io>2022-07-14 20:42:22 -0400
commita302d8717ec80ee415db0e6ecd01399ea055e9ca (patch)
tree77ccf24a09b9e9a3f54a1f255a412345b7e67b49 /usr/src/cmd/eeprom
parent054c6cfb7c5aeb9e46a8f23d52de715370d56595 (diff)
parent62d03eda78495dc4dc79a65a6b1899e11dc34b12 (diff)
downloadillumos-joyent-OS-8395.tar.gz
Merge branch 'master' into OS-8395OS-8395
Diffstat (limited to 'usr/src/cmd/eeprom')
-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