Skip to content

Commit

Permalink
canfdtest: with -vvv verbosity also print the MSG_DONTROUTE and MSG_C…
Browse files Browse the repository at this point in the history
…ONFIRM flags
  • Loading branch information
marckleinebudde committed Jan 17, 2024
1 parent 3f78f77 commit 18f710e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion canfdtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,10 @@ static int can_echo_dut(void)
if (verbose == 1) {
echo_progress(frame.data[0]);
} else if (verbose > 1) {
if (verbose > 2)
printf("%s %s: ",
flags & MSG_DONTROUTE ? "DR" : " ",
flags & MSG_CONFIRM ? "CF" : " ");
print_frame(frame.can_id, frame.data, frame.len, 0);
}

Expand Down Expand Up @@ -400,8 +404,13 @@ static int can_echo_gen(void)
(rx_frame.can_id == can_id_pong && (flags & MSG_DONTROUTE))))
continue;

if (verbose > 1)
if (verbose > 1) {
if (verbose > 2)
printf("%s %s: ",
flags & MSG_DONTROUTE ? "DR" : " ",
flags & MSG_CONFIRM ? "CF" : " ");
print_frame(rx_frame.can_id, rx_frame.data, rx_frame.len, 0);
}

/* own frame */
if (flags & MSG_CONFIRM) {
Expand Down

0 comments on commit 18f710e

Please sign in to comment.