2005-08-08 Dmitry V. Levin <ldv@altlinux.org>
* 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.
diff --git a/system.c b/system.c
index 9d84021..f3308d1 100644
--- 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 @@
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;
}