]> granicus.if.org Git - strace/commitdiff
2005-08-08 Dmitry V. Levin <ldv@altlinux.org>
authorRoland McGrath <roland@redhat.com>
Thu, 12 Jan 2006 21:21:06 +0000 (21:21 +0000)
committerRoland McGrath <roland@redhat.com>
Thu, 12 Jan 2006 21:21:06 +0000 (21:21 +0000)
* system.c [LINUX] (MS_MGC_VAL): New macro.
[LINUX] (mount_flags): Add it.
[LINUX] (sys_mount): If neither MS_BIND nor MS_MOVE bits are
        set in the flags argument, try to fetch data string.
Fixes RH#165377.

system.c

index 9d84021520cdf33ac44412d90be2e2cbab619dfe..f3308d14bd4ff787c21987c97b8b43a074490f77 100644 (file)
--- a/system.c
+++ b/system.c
@@ -53,6 +53,7 @@
 #define MS_POSIXACL    (1<<16) /* VFS does not apply the umask */
 #define MS_ACTIVE      (1<<30)
 #define MS_NOUSER      (1<<31)
+#define MS_MGC_VAL     0xc0ed0000      /* Magic flag number */
 
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -79,6 +80,7 @@
 #include <linux/sysctl.h>
 
 static const struct xlat mount_flags[] = {
+       { MS_MGC_VAL,   "MS_MGC_VAL"    },
        { MS_RDONLY,    "MS_RDONLY"     },
        { MS_NOSUID,    "MS_NOSUID"     },
        { MS_NODEV,     "MS_NODEV"      },
@@ -113,7 +115,11 @@ struct tcb *tcp;
                        tprintf("%#lx", tcp->u_arg[2]);
                tprintf(", ");
                printflags(mount_flags, tcp->u_arg[3], "MS_???");
-               tprintf(", %#lx", tcp->u_arg[4]);
+               tprintf(", ");
+               if ((tcp->u_arg[3] & (MS_BIND|MS_MOVE)) == 0)
+                       printstr(tcp, tcp->u_arg[4], -1);
+               else
+                       tprintf("%#lx", tcp->u_arg[4]);
        }
        return 0;
 }