[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
"long long" via sprintf()
- To: rtl@rtlinux.org
- Subject: "long long" via sprintf()
- From: Ales Bardorfer <alesb@robo.fe.uni-lj.si>
- Date: Mon, 03 Jul 2000 15:52:55 +0200
- References: <39584885.3D02009B@opersys.com> <39587F3D.5315D437@fi.muni.cz> <3959C19B.7E3E00F6@aero.polimi.it> <20000628101411.A10800@hq.fsmlabs.com> <395B8C44.7902817F@opersys.com> <011401bfe202$f950fe70$5d1899c0@aquilagroup.com> <395C55E8.B23F4628@aero.polimi.it> <20000630071438.A30302@hq.fsmlabs.com> <395CC695.C03ACD99@aero.polimi.it> <20000630110153.A2185@hq.fsmlabs.com> <337E387B.7A31E0D2@psu.edu>
- Sender: alesb@robo.fe.uni-lj.si
Hi!
Is it possible to format a string with a "long long" number inside?
hrtime_t for example is "long long" as I know.
Something like:
long long mynumber = 5123456789; // this is longer than 32-bit long int
char msg[255];
sprintf(msg, "My number is %lld",mynumber);
rtl_printf("%s\n", msg);
And what I get in /var/log/messages is:
Jul 3 15:43:17 twister kernel: My number is %ld
????????
What am I doing wrong?
The same code in kernel space with printf() in stead of rtl_printf()
works well.
Thanks in advance,
Ales