Add new format option when mixing EFF/SFF frame output

Added new view CANLIB_VIEW_INDENT_SFF flags to fix the sloppy output of
fprint_long_canframe() when mixing EFF & SFF CAN identifiers.

candump: Once an EFF frame is detected the indention is enabled.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
This commit is contained in:
Oliver Hartkopp
2012-11-14 19:59:18 +01:00
parent e7631bd7f9
commit fcbdf71f1a
5 changed files with 18 additions and 5 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ int main(int argc, char **argv)
}
sprint_long_canframe(ascframe, &cf,
CANLIB_VIEW_ASCII,
(CANLIB_VIEW_INDENT_SFF | CANLIB_VIEW_ASCII),
maxdlen); /* with ASCII output */
printf("%s %s %s\n", timestamp, device, ascframe);