[PATCH 2/3] use print_quoted_string in decode_termio
Eugene Syromyatnikov
evgsyr at gmail.com
Wed Sep 13 19:57:48 UTC 2017
---
term.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/term.c b/term.c
index 9368e5f..28f562f 100644
--- a/term.c
+++ b/term.c
@@ -73,7 +73,6 @@ static void
decode_termio(struct tcb *const tcp, const kernel_ulong_t addr)
{
struct termio tio;
- int i;
tprints(", ");
if (umove_or_printaddr(tcp, addr, &tio))
@@ -102,10 +101,9 @@ decode_termio(struct tcb *const tcp, const kernel_ulong_t addr)
tprintf("c_cc[VMIN]=%d, c_cc[VTIME]=%d, ",
tio.c_cc[VMIN], tio.c_cc[VTIME]);
#endif /* !_VMIN */
- tprints("c_cc=\"");
- for (i = 0; i < NCC; i++)
- tprintf("\\x%02x", tio.c_cc[i]);
- tprints("\"}");
+ tprints("c_cc=");
+ print_quoted_string((char *) tio.c_cc, NCC, QUOTE_FORCE_HEX);
+ tprints("}");
}
static void
--
2.1.4
More information about the Strace-devel
mailing list