cangen: remove fprint_(long_)canframe usage

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
pull/504/head
Oliver Hartkopp 2024-02-27 10:57:55 +01:00
parent 8d8d17e25d
commit 9d900f913c
1 changed files with 6 additions and 2 deletions

View File

@ -828,12 +828,16 @@ int main(int argc, char **argv)
}
if (verbose) {
static char abuf[10000]; /* ASCII buf FIXME - use calculated value */
printf(" %s ", argv[optind]);
if (verbose > 1)
fprint_long_canframe(stdout, &frame, "\n", (verbose > 2) ? 1 : 0);
sprint_long_canframe(abuf, &frame, (verbose > 2) ? CANLIB_VIEW_ASCII : 0);
else
fprint_canframe(stdout, &frame, "\n", 1);
sprint_canframe(abuf, &frame, 1);
printf("%s\n", abuf);
}
ret = do_send_one(s, &frame, mtu, polltimeout);