Messages in this thread | | | Date | Wed, 17 Nov 2004 17:58:11 +0000 | From | Al Viro <> | Subject | Re: [PATCH] cx88: fix printk arg. type |
| |
On Wed, Nov 17, 2004 at 06:25:19PM +0100, Gerd Knorr wrote: > > - dprintk(0, "ERROR: Firmware size mismatch (have %ld, expected %d)\n", > > + dprintk(0, "ERROR: Firmware size mismatch (have %Zd, expected %d)\n", > > Thanks, merged to cvs. I like that 'Z'. Or is that just a linux-kernel > printk specific thingy? Or is this standardized somewhere? So I could > use that in userspace code as well maybe?
'Z' is an obsolete equivalent of standard 'z'. That one is portable and it is, indeed, available in userland (libc6 and anything C99-compliant). To quote the manpage:
z A following integer conversion corresponds to a size_t or ssize_t argument. (Linux libc5 has Z with this meaning. Don't use it.)
t A following integer conversion corresponds to a ptrdiff_t argu- ment.
Please, do s/Zd/zd/.
One more thing: folks, please stop using crap like "%08x", (int)pointer. It's not only non-portable (consider 64bit boxen), it's extra work for no good reason. "%p" is standard and will do the right thing with less PITA. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |