aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-01-27 16:42:19 +0100
committerStefano Brivio <sbrivio@redhat.com>2022-01-27 16:44:05 +0100
commitffc3183ac15c1262c391acf492bd69f802362f35 (patch)
treea4ddf26933d794cea68505a7a781c22d84366d17
parent1802871e9ef8516f7817046a27a7f2121ae2b0b1 (diff)
downloadpasst-ffc3183ac15c1262c391acf492bd69f802362f35.tar
passt-ffc3183ac15c1262c391acf492bd69f802362f35.tar.gz
passt-ffc3183ac15c1262c391acf492bd69f802362f35.tar.bz2
passt-ffc3183ac15c1262c391acf492bd69f802362f35.tar.lz
passt-ffc3183ac15c1262c391acf492bd69f802362f35.tar.xz
passt-ffc3183ac15c1262c391acf492bd69f802362f35.tar.zst
passt-ffc3183ac15c1262c391acf492bd69f802362f35.zip
conf: Fix support for --stderr as short option (-e)
I forgot --stderr could also be -e, fix handling. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--conf.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/conf.c b/conf.c
index 7859f25..9a9dade 100644
--- a/conf.c
+++ b/conf.c
@@ -766,7 +766,7 @@ void conf(struct ctx *c, int argc, char **argv)
{"debug", no_argument, NULL, 'd' },
{"quiet", no_argument, NULL, 'q' },
{"foreground", no_argument, NULL, 'f' },
- {"stderr", no_argument, &c->stderr, 1 },
+ {"stderr", no_argument, NULL, 'e' },
{"help", no_argument, NULL, 'h' },
{"socket", required_argument, NULL, 's' },
{"ns-ifname", required_argument, NULL, 'I' },
@@ -889,6 +889,14 @@ void conf(struct ctx *c, int argc, char **argv)
c->debug = 1;
c->foreground = 1;
break;
+ case 'e':
+ if (c->stderr) {
+ err("Multiple --stderr options given");
+ usage(argv[0]);
+ }
+
+ c->stderr = 1;
+ break;
case 'q':
if (c->quiet) {
err("Multiple --quiet options given");