]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: add the pathname to get the realpath in case of failure 2628/head
authorPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 2 Jul 2018 16:27:46 +0000 (18:27 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Fri, 6 Jul 2018 06:51:54 +0000 (08:51 +0200)
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>
lib/netns_linux.c

index a3fae8f39fab05a591a12acf35af9d9c1a651e77..a80b51fa007be00861dd032926ddb08b2e87034f 100644 (file)
@@ -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);