Re: printk issue - bug?

From: Robert Hancock
Date: Sat Mar 07 2009 - 21:20:51 EST


Adrian McMenamin wrote:
2009/3/7 Roland Dreier <rdreier@xxxxxxxxx>:

ie offset is a 64-bit type but the printk format for it is %x, which
presumably only consumes 32 bits on SH4? Seems like your code is buggy
and you ignored a compiler warning about printk format mismatch?

- R.


Yes, loff_t is a long long but why did it work in the first line and
not the second?

It didn't. You didn't print loff_t in the first printk, and the variable size mismatch corrupted the next value being printed in the second one.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/