]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
iproute2: Improve "ip netns add" failure error message
authorEric W. Biederman <ebiederm@xmission.com>
Thu, 17 Jan 2013 14:46:43 +0000 (14:46 +0000)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 4 Feb 2013 16:33:55 +0000 (08:33 -0800)
Report the name of the network namespace that could not be
added.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
ip/ipnetns.c

index ae5509021a6f69d21dfced35400cb7c89dc5a077..4fce379a4b2e307be9d254c853ba09d4d48f2da6 100644 (file)
@@ -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) {