mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
MFC r197833:
When run() returns an error, print the error message also in non-interactive mode. Previously error messages were printed only in interactive mode. PR: bin/124517 Approved by: trasz (mentor)
This commit is contained in:
parent
7647320449
commit
1a225ffb6a
1 changed files with 6 additions and 2 deletions
|
|
@ -241,7 +241,7 @@ int main (int argc, char **argv)
|
|||
|
||||
if (argc > 0) {
|
||||
char buf[80], *p;
|
||||
int len;
|
||||
int len, rc;
|
||||
|
||||
for (p=buf; argc-->0; ++argv) {
|
||||
len = strlen (*argv);
|
||||
|
|
@ -257,7 +257,11 @@ int main (int argc, char **argv)
|
|||
}
|
||||
*p = 0;
|
||||
arg = parse (buf, &cmd);
|
||||
return (run (cmd, arg));
|
||||
rc = run (cmd, arg);
|
||||
if (rc < 0 && verbose)
|
||||
warn(NULL);
|
||||
|
||||
return (rc);
|
||||
}
|
||||
|
||||
if (verbose == 1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue