diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-03-19 13:03:49 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-03-19 15:29:44 +0100 |
commit | b6056ea37cda628c2053aa3554ac32502b5223ff (patch) | |
tree | 056bd354792fcb3e90d3375674d2335ab0c4ad34 /src/stdio-bridge | |
parent | stdio-bridge: fix getopt() parameter list to match reality (diff) | |
download | systemd-b6056ea37cda628c2053aa3554ac32502b5223ff.tar.xz systemd-b6056ea37cda628c2053aa3554ac32502b5223ff.zip |
stdio-bridge: tweak getopt() case statement a bit
Diffstat (limited to 'src/stdio-bridge')
-rw-r--r-- | src/stdio-bridge/stdio-bridge.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/stdio-bridge/stdio-bridge.c b/src/stdio-bridge/stdio-bridge.c index 8022d3e596..323191def6 100644 --- a/src/stdio-bridge/stdio-bridge.c +++ b/src/stdio-bridge/stdio-bridge.c @@ -62,26 +62,23 @@ static int parse_argv(int argc, char *argv[]) { switch (c) { case 'h': - help(); - return 0; + return help(); case ARG_VERSION: return version(); - case '?': - return -EINVAL; - case 'p': arg_bus_path = optarg; - break; case 'M': arg_bus_path = optarg; - arg_transport = BUS_TRANSPORT_MACHINE; - break; + + case '?': + return -EINVAL; + default: return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Unknown option code %c", c); |