diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2018-07-02 18:27:46 +0200 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2018-07-06 08:51:54 +0200 |
commit | 0faeba264e73e5a16191a2989dd03288b67cfb2a (patch) | |
tree | 82d578f991d001bcb3d7df522664b5edb81f5945 /lib/netns_linux.c | |
parent | Merge pull request #2624 from donaldsharp/PIM_ZOMILY_ZOM (diff) | |
download | frr-0faeba264e73e5a16191a2989dd03288b67cfb2a.tar.xz frr-0faeba264e73e5a16191a2989dd03288b67cfb2a.zip |
lib: add the pathname to get the realpath in case of failure
Sometimes, the file under /var/run/netns may not be authorised to be
read ( because it is not read permission for frr user, for instance).
so it is good to know what happened.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'lib/netns_linux.c')
-rw-r--r-- | lib/netns_linux.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/netns_linux.c b/lib/netns_linux.c index a3fae8f39..a80b51fa0 100644 --- a/lib/netns_linux.c +++ b/lib/netns_linux.c @@ -435,10 +435,13 @@ char *ns_netns_pathname(struct vty *vty, const char *name) if (!result) { if (vty) - vty_out(vty, "Invalid pathname: %s\n", + vty_out(vty, "Invalid pathname for %s: %s\n", + pathname, safe_strerror(errno)); else - zlog_warn("Invalid pathname: %s", safe_strerror(errno)); + zlog_warn("Invalid pathname for %s: %s", + pathname, + safe_strerror(errno)); return NULL; } check_base = basename(pathname); |