]> granicus.if.org Git - strace/commitdiff
quota: move Q_QUOTAON handling to subcommand switch statement
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 26 Sep 2016 19:03:52 +0000 (19:03 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 27 Sep 2016 00:57:28 +0000 (00:57 +0000)
* quota.c (SYS_FUNC(quotactl)): Move handling of Q_QUOTAON subcommand ...
(decode_cmd_data): ... here.

quota.c

diff --git a/quota.c b/quota.c
index c28480f4baa980af382117bbe4ccdbbf912273b9..e08bd5fef0da7aa2248d43a103664a643364cce2 100644 (file)
--- a/quota.c
+++ b/quota.c
@@ -166,6 +166,12 @@ decode_cmd_data(struct tcb *tcp, uint32_t id, uint32_t cmd, unsigned long data)
        case Q_SYNC:
        case Q_XQUOTASYNC:
                break;
+       case Q_QUOTAON:
+               tprints(", ");
+               printxval(quota_formats, id, "QFMT_VFS_???");
+               tprints(", ");
+               printpath(tcp, data);
+               break;
        case Q_GETQUOTA:
                if (entering(tcp)) {
                        printuid(", ", id);
@@ -457,14 +463,6 @@ SYS_FUNC(quotactl)
                printxval(quotatypes, type, "???QUOTA");
                tprints("), ");
                printpath(tcp, tcp->u_arg[1]);
-               switch (cmd) {
-                       case Q_QUOTAON:
-                               tprints(", ");
-                               printxval(quota_formats, id, "QFMT_VFS_???");
-                               tprints(", ");
-                               printpath(tcp, tcp->u_arg[3]);
-                               return RVAL_DECODED;
-               }
        }
        return decode_cmd_data(tcp, id, cmd, tcp->u_arg[3]);
 }