]> granicus.if.org Git - strace/commitdiff
mount.c: make use of RVAL_DECODED
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 19 Jul 2015 23:00:35 +0000 (23:00 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 20 Jul 2015 01:42:01 +0000 (01:42 +0000)
* mount.c (sys_mount): Update for RVAL_DECODED.

mount.c

diff --git a/mount.c b/mount.c
index b096c5368a3d6c584151d59c8b4889ca6de4b617..51c7b3e47778df30831038275d14f68efd6a2ea0 100644 (file)
--- a/mount.c
+++ b/mount.c
@@ -7,49 +7,48 @@
 
 SYS_FUNC(mount)
 {
-       if (entering(tcp)) {
-               bool ignore_type = false;
-               bool ignore_data = false;
-               bool old_magic = false;
-               unsigned long flags = tcp->u_arg[3];
-
-               /* Discard magic */
-               if ((flags & MS_MGC_MSK) == MS_MGC_VAL) {
-                       flags &= ~MS_MGC_MSK;
-                       old_magic = true;
-               }
-
-               if (flags & MS_REMOUNT)
-                       ignore_type = true;
-               else if (flags & (MS_BIND | MS_MOVE | MS_SHARED
-                                 | MS_PRIVATE | MS_SLAVE | MS_UNBINDABLE))
-                       ignore_type = ignore_data = true;
-
-               printpath(tcp, tcp->u_arg[0]);
-               tprints(", ");
-
-               printpath(tcp, tcp->u_arg[1]);
-               tprints(", ");
-
-               if (ignore_type)
-                       printaddr(tcp->u_arg[2]);
-               else
-                       printstr(tcp, tcp->u_arg[2], -1);
-               tprints(", ");
-
-               if (old_magic) {
-                       tprints("MS_MGC_VAL");
-                       if (flags)
-                               tprints("|");
-               }
-               if (flags || !old_magic)
-                       printflags(mount_flags, flags, "MS_???");
-               tprints(", ");
-
-               if (ignore_data)
-                       printaddr(tcp->u_arg[4]);
-               else
-                       printstr(tcp, tcp->u_arg[4], -1);
+       bool ignore_type = false;
+       bool ignore_data = false;
+       bool old_magic = false;
+       unsigned long flags = tcp->u_arg[3];
+
+       /* Discard magic */
+       if ((flags & MS_MGC_MSK) == MS_MGC_VAL) {
+               flags &= ~MS_MGC_MSK;
+               old_magic = true;
        }
-       return 0;
+
+       if (flags & MS_REMOUNT)
+               ignore_type = true;
+       else if (flags & (MS_BIND | MS_MOVE | MS_SHARED
+                         | MS_PRIVATE | MS_SLAVE | MS_UNBINDABLE))
+               ignore_type = ignore_data = true;
+
+       printpath(tcp, tcp->u_arg[0]);
+       tprints(", ");
+
+       printpath(tcp, tcp->u_arg[1]);
+       tprints(", ");
+
+       if (ignore_type)
+               printaddr(tcp->u_arg[2]);
+       else
+               printstr(tcp, tcp->u_arg[2], -1);
+       tprints(", ");
+
+       if (old_magic) {
+               tprints("MS_MGC_VAL");
+               if (flags)
+                       tprints("|");
+       }
+       if (flags || !old_magic)
+               printflags(mount_flags, flags, "MS_???");
+       tprints(", ");
+
+       if (ignore_data)
+               printaddr(tcp->u_arg[4]);
+       else
+               printstr(tcp, tcp->u_arg[4], -1);
+
+       return RVAL_DECODED;
 }