Closed
Description
_vprintk
and by extension all of the formatted print routines in Zephyr support "%lld"
and variants to print 64-bit values. However, the code that does this discards the top 32-bits of these values, and just prints them using the 32-bit printing code:
long d;
if (long_ctr < 2) {
d = va_arg(ap, long);
} else {
d = (long)va_arg(ap, long long);
}
This could be fixed by by generalizing the print routines to use 64-bit values, although there could be a performance cost to this affecting all of the print routines. However, the current behavior is misleading, and we'd probably be better printing something like "ERR" rather than printing incorrect values.