mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-05 06:20:00 +02:00
canfdtest: can_echo_dut(): make use of print_frame() instead of open coding it
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
+1
-9
@@ -210,15 +210,7 @@ static int can_echo_dut(void)
|
|||||||
if (verbose == 1) {
|
if (verbose == 1) {
|
||||||
echo_progress(frame.data[0]);
|
echo_progress(frame.data[0]);
|
||||||
} else if (verbose > 1) {
|
} else if (verbose > 1) {
|
||||||
printf("%04x: ", frame.can_id);
|
print_frame(&frame, 0);
|
||||||
if (frame.can_id & CAN_RTR_FLAG) {
|
|
||||||
printf("remote request");
|
|
||||||
} else {
|
|
||||||
printf("[%d]", frame.can_dlc);
|
|
||||||
for (i = 0; i < frame.can_dlc; i++)
|
|
||||||
printf(" %02x", frame.data[i]);
|
|
||||||
}
|
|
||||||
printf("\n");
|
|
||||||
}
|
}
|
||||||
frame.can_id++;
|
frame.can_id++;
|
||||||
for (i = 0; i < frame.can_dlc; i++)
|
for (i = 0; i < frame.can_dlc; i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user