Skip to contentSkip to conversation

printk and long long

DISCUSSION Bart Hartgers 3 participants 3 messages Feb 11, 2004

lore
Share & tools
lore
#0 lore raw
Quoted 9 lines · Maciej Zenczykowski
Quoted 4 lines

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 ?

Quoted 6 lines

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 2 lines
Bart Hartgers - TUE Eindhoven 
http://plasimo.phys.tue.nl/bart/contact.html
#1 lore raw

In article <[email protected]> (at Wed, 11 Feb 2004 14:54:56 +0100 (CET)), Bart Hartgers <[email protected]> says:

Quoted 7 lines · Maciej Zenczykowski
Quoted 6 lines
Quoted 4 lines

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.

:

Quoted 1 line

And use %lx%lx ?

%08lx%08lx

--yoshfuji

#2 lore raw
In reply to Bart Hartgers
Quoted 6 lines · Bart Hartgers
Quoted 5 lines · Maciej Zenczykowski
Quoted 4 lines

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);

Quoted 6 lines
Quoted 4 lines

I'd venture to guess you'd also have to cast the above to long.

Cheers,
MaZe.

And use %lx%lx ?

Rather %lx%0lx.

Andreas.

Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."