mirror of
https://github.com/linux-can/can-utils.git
synced 2026-09-20 23:12:09 +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:
@@ -171,6 +171,7 @@ void sprint_canframe(char *buf , struct canfd_frame *cf, int sep, int maxdlen);
|
||||
#define CANLIB_VIEW_BINARY 0x2
|
||||
#define CANLIB_VIEW_SWAP 0x4
|
||||
#define CANLIB_VIEW_ERROR 0x8
|
||||
#define CANLIB_VIEW_INDENT_SFF 0x10
|
||||
|
||||
#define SWAP_DELIMITER '`'
|
||||
|
||||
@@ -189,6 +190,9 @@ void sprint_long_canframe(char *buf , struct canfd_frame *cf, int view, int maxd
|
||||
* 20001111 [7] C6 23 7B 32 69 98 3C ERRORFRAME -> (CAN_ERR_FLAG set)
|
||||
* 12345678 [03] 11 22 33 -> CAN FD with exended CAN-Id = 0x12345678, dlc = 3
|
||||
*
|
||||
* 123 [3] 11 22 33 -> CANLIB_VIEW_INDENT_SFF == 0
|
||||
* 123 [3] 11 22 33 -> CANLIB_VIEW_INDENT_SFF == set
|
||||
*
|
||||
* Examples:
|
||||
*
|
||||
* // CAN FD frame with eol to STDOUT
|
||||
|
||||
Reference in New Issue
Block a user