[openbeos] Re: driver dprintf question

On Thu, 24 Jul 2003 21:43:16 +0200 CEST "Axel Dörfler" <axeld@pinc-
software.de> wrote:
> "Alexander G. M. Smith" <agmsmith@xxxxxxxxxx> wrote:
> > Bruno van Dooren wrote on Thu, 24 Jul 2003 21:16:13 +0200:
> > > i am debugging my ps2 input device driver. for that i am using 
> > > the 
> > > kernel
> > > syslog file by using dprintf.
> > > i wanted to print timeout values of type t_bigtime that hold 
> > > SystemTime()
> > > values.
> > Kernel dprintf is more limited than regular printf.  Doesn't do 
> > floating point 
> > at all, and doesn't do octal numbers.  For 64 bit integers, use %Ld 
> > rather
> > than %ld (32 bit integers) or %d (native integer length).
> 
> Apart from that, that's also needed in userland! %Ld for 64 bit 
> values 
> (or %lld - dunno if that works on BeOS, though), %ld is only 32 bits.

%lld (the correct format BTW) works in userland, but not with dprintf 
in the kernel -- there one has to use %Ld. Speaking for R5 only, 
though.

CU, Ingo


Other related posts: