diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2022-08-26 14:58:36 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2022-08-30 19:43:31 +0200 |
commit | 70389d364089f7e9f132f712f6b2d6ab2b129453 (patch) | |
tree | 03b85dad6e1bff9619601220c1a1981292f2325c | |
parent | 8de488892f3909fbce00643b5f2d494bb2304adf (diff) | |
download | passt-70389d364089f7e9f132f712f6b2d6ab2b129453.tar passt-70389d364089f7e9f132f712f6b2d6ab2b129453.tar.gz passt-70389d364089f7e9f132f712f6b2d6ab2b129453.tar.bz2 passt-70389d364089f7e9f132f712f6b2d6ab2b129453.tar.lz passt-70389d364089f7e9f132f712f6b2d6ab2b129453.tar.xz passt-70389d364089f7e9f132f712f6b2d6ab2b129453.tar.zst passt-70389d364089f7e9f132f712f6b2d6ab2b129453.zip |
Move ENOENT error message into conf_ns_opt()
After calling conf_ns_opt() we check for -ENOENT and print an error
message, but conf_ns_opt() prints messages for other errors itself. For
consistency move the ENOENT message into conf_ns_opt() as well.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r-- | conf.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -602,6 +602,7 @@ static int conf_ns_opt(struct ctx *c, c->netns_only = netns_only_reset; + err("Namespace %s not found", optarg); return -ENOENT; } @@ -1464,8 +1465,6 @@ void conf(struct ctx *c, int argc, char **argv) if (c->mode == MODE_PASTA && optind + 1 == argc) { ret = conf_ns_opt(c, userns, argv[optind]); - if (ret == -ENOENT) - err("Namespace %s not found", argv[optind]); if (ret < 0) usage(argv[0]); } else if (c->mode == MODE_PASTA && *userns && optind == argc) { |