public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* printk and long long
@ 2004-02-11 12:49 sting sting
  2004-02-11 13:35 ` wdebruij
  0 siblings, 1 reply; 20+ messages in thread
From: sting sting @ 2004-02-11 12:49 UTC (permalink / raw)
  To: linux-kernel

Hello,
I am trying to perfrom printk with a variable of type long long.
(loff_t is that type and it is long long , as can be seen in posix+types.h).
what is the format string for such a type ?
I had tried %lld" but it gace wrpng results.
regards,
sting

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


^ permalink raw reply	[flat|nested] 20+ messages in thread
* Re: printk and long long
@ 2004-02-11 13:54 Bart Hartgers
  2004-02-11 14:04 ` YOSHIFUJI Hideaki / 吉藤英明
  2004-02-11 14:13 ` Andreas Schwab
  0 siblings, 2 replies; 20+ messages in thread
From: Bart Hartgers @ 2004-02-11 13:54 UTC (permalink / raw)
  To: maze; +Cc: wdebruij, zstingx, linux-kernel

On 11 Feb, Maciej Zenczykowski wrote:
>> how about simply using a shift to output two regular longs, i.e.
>> 
>> printk("%ld%ld",loff_t >> (sizeof(long) * 8), loff_t << sizeof(long) * 8 >>
>> sizeof(long) * 8);
> 
> I'd venture to guess you'd also have to cast the above to long.
> 
> Cheers,
> MaZe.

And use %lx%lx ?

> 
> -
> 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/

-- 
Bart Hartgers - TUE Eindhoven 
http://plasimo.phys.tue.nl/bart/contact.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2004-02-13  0:31 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-11 12:49 printk and long long sting sting
2004-02-11 13:35 ` wdebruij
2004-02-11 13:48   ` Maciej Zenczykowski
2004-02-11 14:04     ` vda
2004-02-11 15:58       ` Maciej Zenczykowski
2004-02-11 19:41         ` H. Peter Anvin
2004-02-11 20:32           ` Måns Rullgård
2004-02-11 21:46             ` Chris Friesen
2004-02-11 22:38               ` Timothy Miller
2004-02-11 22:23             ` Andreas Schwab
2004-02-11 23:11               ` Måns Rullgård
2004-02-11 23:53                 ` H. Peter Anvin
2004-02-11 16:59       ` Dick Streefland
2004-02-11 14:03   ` Måns Rullgård
2004-02-11 14:15     ` wdebruij
2004-02-11 15:23   ` Richard B. Johnson
2004-02-13  0:26     ` Peter Chubb
  -- strict thread matches above, loose matches on Subject: below --
2004-02-11 13:54 Bart Hartgers
2004-02-11 14:04 ` YOSHIFUJI Hideaki / 吉藤英明
2004-02-11 14:13 ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox