From: wdebruij@dds.nl
To: "Måns Rullgård" <mru@kth.se>
Cc: linux-kernel@vger.kernel.org
Subject: Re: printk and long long
Date: Wed, 11 Feb 2004 15:15:20 +0100 [thread overview]
Message-ID: <1076508920.402a38f8ee106@webmail.dds.nl> (raw)
In-Reply-To: <yw1xy8r9iuha.fsf@kth.se>
Quoting Måns Rullgård <mru@kth.se>:
>
> And how do you plan to make sense of the printed value?
>
perhaps I was a bit quick with replying. As others have pointed out, you should
specify the precision to be able to glue the two parts together. Ideally, this
should be done using a "%.8lx%.8lx", since the length of the variable in hex is
static. Unfortunately, it seems %ld is requested, in which case "%ld*(2^32)+%ld"
works (for humans), but is obviously not great.
I guess you'll need a number of extra tests (if lower 32bits > 1 billion ..) and
specific printk statements if the output should be shown as a correct 10-base
number.
I don't know, it depends on the specific use-case, really. If at all possible, I
would stick to the hex-representation.
next prev parent reply other threads:[~2004-02-11 14:15 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1076508920.402a38f8ee106@webmail.dds.nl \
--to=wdebruij@dds.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mru@kth.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.