From 83a1210b75af72b6915ead88f674b02e5e73a2e0 Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Fri, 23 Aug 2019 19:40:27 +0200 Subject: [PATCH] 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 --- candump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/candump.c b/candump.c index 35b39aa..b6aab6c 100644 --- a/candump.c +++ b/candump.c @@ -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 */