]> granicus.if.org Git - strace/commitdiff
term: do not abort decoding in case of non-verbose output
authorEugene Syromyatnikov <evgsyr@gmail.com>
Sun, 1 Jan 2017 18:46:42 +0000 (21:46 +0300)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 6 Jan 2017 11:39:33 +0000 (11:39 +0000)
The case of unset verbose is handled by umoven_or_printaddr, moreover,
exiting at this point is plain wrong and leads to last argument not
being printed while it should be.

* term.c (decode_termios, decode_termio, decode_winsize, decode_ttysize,
decode_modem_flags): Do not check verbose flags explicitly and do not
exit early if it is not set.

term.c

diff --git a/term.c b/term.c
index dcac3ccd36b32998e63c28a5b770d6aee1ed780b..d083cdd541b57ae97fbed6ee4983148cc90ef93f 100644 (file)
--- a/term.c
+++ b/term.c
@@ -43,9 +43,6 @@ decode_termios(struct tcb *const tcp, const kernel_ulong_t addr)
        struct termios tios;
        int i;
 
-       if (!verbose(tcp))
-               return;
-
        tprints(", ");
        if (umove_or_printaddr(tcp, addr, &tios))
                return;
@@ -79,9 +76,6 @@ decode_termio(struct tcb *const tcp, const kernel_ulong_t addr)
        struct termio tio;
        int i;
 
-       if (!verbose(tcp))
-               return;
-
        tprints(", ");
        if (umove_or_printaddr(tcp, addr, &tio))
                return;
@@ -120,9 +114,6 @@ decode_winsize(struct tcb *const tcp, const kernel_ulong_t addr)
 {
        struct winsize ws;
 
-       if (!verbose(tcp))
-               return;
-
        tprints(", ");
        if (umove_or_printaddr(tcp, addr, &ws))
                return;
@@ -136,9 +127,6 @@ decode_ttysize(struct tcb *const tcp, const kernel_ulong_t addr)
 {
        struct ttysize ts;
 
-       if (!verbose(tcp))
-               return;
-
        tprints(", ");
        if (umove_or_printaddr(tcp, addr, &ts))
                return;
@@ -152,9 +140,6 @@ decode_modem_flags(struct tcb *const tcp, const kernel_ulong_t addr)
 {
        int i;
 
-       if (!verbose(tcp))
-               return;
-
        tprints(", ");
        if (umove_or_printaddr(tcp, addr, &i))
                return;