mirror of
https://github.com/linux-can/can-utils.git
synced 2026-09-23 00:21:14 +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:
@@ -673,6 +673,10 @@ int main(int argc, char **argv)
|
||||
|
||||
idx = idx2dindex(addr.can_ifindex, s[i]);
|
||||
|
||||
/* once we detected a EFF frame indent SFF frames accordingly */
|
||||
if (frame.can_id & CAN_EFF_FLAG)
|
||||
view |= CANLIB_VIEW_INDENT_SFF;
|
||||
|
||||
if (log) {
|
||||
/* log CAN frame with absolute timestamp & device */
|
||||
fprintf(logfile, "(%ld.%06ld) ", tv.tv_sec, tv.tv_usec);
|
||||
|
||||
Reference in New Issue
Block a user