mirror of
https://github.com/linux-can/can-utils.git
synced 2026-09-22 08:06:34 +02:00
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:
+2
-2
@@ -455,9 +455,9 @@ int main(int argc, char **argv)
|
||||
printf("%s (%s) ", get_txname(device), device);
|
||||
|
||||
if (txmtu == CAN_MTU)
|
||||
fprint_long_canframe(stdout, &frame, "\n", 0, CAN_MAX_DLEN);
|
||||
fprint_long_canframe(stdout, &frame, "\n", CANLIB_VIEW_INDENT_SFF, CAN_MAX_DLEN);
|
||||
else
|
||||
fprint_long_canframe(stdout, &frame, "\n", 0, CANFD_MAX_DLEN);
|
||||
fprint_long_canframe(stdout, &frame, "\n", CANLIB_VIEW_INDENT_SFF, CANFD_MAX_DLEN);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user