mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
- Provide a reasonable error message for `export -p var'.
- Use argv rather than argptr since getopt() is used here.
This commit is contained in:
parent
e4c880af3f
commit
3fda45eca8
1 changed files with 3 additions and 1 deletions
|
|
@ -541,9 +541,11 @@ exportcmd(int argc, char **argv)
|
|||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
if (values && argc != 0)
|
||||
error("-p requires no arguments");
|
||||
listsetvar(cmdenviron);
|
||||
if (argc != 0) {
|
||||
while ((name = *argptr++) != NULL) {
|
||||
while ((name = *argv++) != NULL) {
|
||||
if ((p = strchr(name, '=')) != NULL) {
|
||||
p++;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue