candump: preserve silent mode with enabled log file output format

As seen in https://github.com/linux-can/can-utils/issues/150 the logfile
format switch ignores the silent mode switch.

Fix this by checking the silent mode when using logfile format on stdout.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
This commit is contained in:
Oliver Hartkopp
2019-08-23 19:40:27 +02:00
parent 818dacd78f
commit 83a1210b75
+1 -1
View File
@@ -773,7 +773,7 @@ int main(int argc, char **argv)
max_devname_len, devname[idx], buf); max_devname_len, devname[idx], buf);
} }
if (logfrmt) { if ((logfrmt) && (silent == SILENT_OFF)){
char buf[CL_CFSZ]; /* max length */ char buf[CL_CFSZ]; /* max length */
/* print CAN frame in log file style to stdout */ /* print CAN frame in log file style to stdout */