Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions canutils/candump/candump.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,15 @@
#endif

/* from #include <linux/net_tstamp.h> - since Linux 2.6.30 */
#ifndef SOF_TIMESTAMPING_SOFTWARE
#define SOF_TIMESTAMPING_SOFTWARE (1<<4)
#endif
#ifndef SOF_TIMESTAMPING_RX_SOFTWARE
#define SOF_TIMESTAMPING_RX_SOFTWARE (1<<3)
#endif
#ifndef SOF_TIMESTAMPING_RAW_HARDWARE
#define SOF_TIMESTAMPING_RAW_HARDWARE (1<<6)
#endif

#define MAXSOCK 16 /* max. number of CAN interfaces given on the cmdline */
#define MAXIFNAMES 30 /* size of receive name index to omit ioctls */
Expand All @@ -102,7 +108,7 @@
#define MAGENTA ATTBOLD FGMAGENTA
#define CYAN ATTBOLD FGCYAN

const char col_on [MAXCOL][19] = {BLUE, RED, GREEN, BOLD, MAGENTA, CYAN};

Check failure on line 111 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Blank line precedes right brace at line

Check failure on line 111 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Right bracket not on separate line

Check failure on line 111 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Left bracket not on separate line

Check failure on line 111 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Multiple data definitions

Check failure on line 111 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Blank line precedes right brace at line

Check failure on line 111 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Right bracket not on separate line

Check failure on line 111 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Left bracket not on separate line

Check failure on line 111 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Multiple data definitions
const char col_off [] = ATTRESET;

/****************************************************************************
Expand All @@ -111,14 +117,14 @@

static __u32 dropcnt[MAXSOCK];
static __u32 last_dropcnt[MAXSOCK];
static char devname[MAXIFNAMES][IFNAMSIZ+1];

Check failure on line 120 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Operator/assignment must be preceded with whitespace

Check failure on line 120 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Operator/assignment must be preceded with whitespace
static int dindex[MAXIFNAMES];
static int max_devname_len; /* to prevent frazzled device name output */
const int canfd_on = 1;

#define MAXANI 4
const char anichar[MAXANI] = {'|', '/', '-', '\\'};

Check failure on line 126 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Right bracket not on separate line

Check failure on line 126 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Left bracket not on separate line

Check failure on line 126 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Multiple data definitions

Check failure on line 126 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Right bracket not on separate line

Check failure on line 126 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Left bracket not on separate line

Check failure on line 126 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Multiple data definitions
const char extra_m_info[4][4] = {"- -", "B -", "- E", "B E"};

Check failure on line 127 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Left bracket not on separate line

Check failure on line 127 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Multiple data definitions

Check failure on line 127 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Left bracket not on separate line

Check failure on line 127 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Multiple data definitions

static volatile int running = 1;

Expand Down Expand Up @@ -444,7 +450,7 @@
while (ptr) {
numfilter++;
ptr++; /* hop behind the ',' */
ptr = strchr(ptr, ','); /* exit condition */

Check warning on line 453 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Wrong column position of comment right of code

Check warning on line 453 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Wrong column position of comment right of code
}

rfilter = malloc(sizeof(struct can_filter) * numfilter);
Expand All @@ -460,7 +466,7 @@
while (nptr) {

ptr = nptr+1; /* hop behind the ',' */
nptr = strchr(ptr, ','); /* update exit condition */

Check warning on line 469 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Wrong column position of comment right of code

Check warning on line 469 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Wrong column position of comment right of code

if (sscanf(ptr, "%" SCNx32 ":%" SCNx32,
&rfilter[numfilter].can_id,
Expand Down
Loading