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" <ebiederm@xmission.com>
This commit is contained in:
Eric W. Biederman 2013-01-17 14:46:43 +00:00 committed by Stephen Hemminger
parent 8e2d47dce2
commit 4395d48c78
1 changed files with 2 additions and 2 deletions

View 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) {