[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"long long" via sprintf()



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