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>
pull/145/head
Oliver Hartkopp 2019-08-23 19:40:27 +02:00
parent 818dacd78f
commit 83a1210b75
1 changed files with 1 additions and 1 deletions

View File

@ -773,7 +773,7 @@ int main(int argc, char **argv)
max_devname_len, devname[idx], buf);
}
if (logfrmt) {
if ((logfrmt) && (silent == SILENT_OFF)){
char buf[CL_CFSZ]; /* max length */
/* print CAN frame in log file style to stdout */