From: Eric W. Biederman Date: Thu, 17 Jan 2013 14:46:43 +0000 (+0000) Subject: iproute2: Improve "ip netns add" failure error message X-Git-Tag: v3.8.0~3^2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4395d48c78a77a99c5a8618403211032356fe552;p=thirdparty%2Fiproute2.git iproute2: Improve "ip netns add" failure error message Report the name of the network namespace that could not be added. Signed-off-by: "Eric W. Biederman" --- diff --git a/ip/ipnetns.c b/ip/ipnetns.c index ae5509021..4fce379a4 100644 --- a/ip/ipnetns.c +++ b/ip/ipnetns.c @@ -135,8 +135,8 @@ static int netns_exec(int argc, char **argv) snprintf(net_path, sizeof(net_path), "%s/%s", NETNS_RUN_DIR, name); netns = open(net_path, O_RDONLY); if (netns < 0) { - fprintf(stderr, "Cannot open network namespace: %s\n", - strerror(errno)); + fprintf(stderr, "Cannot open network namespace %s: %s\n", + name, strerror(errno)); return EXIT_FAILURE; } if (setns(netns, CLONE_NEWNET) < 0) {