Subject: Re: disk block number printing
To: <>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 04/13/2003 08:19:33
On Sun, Apr 13, 2003 at 09:14:30AM +1000, Darren Reed wrote:
> In sys/kern/subr_disk.c, diskerr() uses %d to display block numbers.
> 
> For block numbers > 2^32, the output is not going to be correct, but
> if I look at daddr_t, it may not always be int64_t.

true... 'tis bust, well spotted.
I'll fix it!

> Is there a reason why this shouldn't be %qd ?

Yes, because that is a gccism, the C format is %lld (for long long).
But even that isn't correct for uint64_t.

> On a related, but different note, does anyone know if the printf format
> style of "%I64d" is part of Posix and/or likely to be supported by NetBSD
> anytime soon ?  This capability is already present in Visual Studio .NET.

That isn't in C or Posix.  You need to use:
	"....%" PRId64 "..."

	David

-- 
David Laight: david@l8s.co.uk