mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Giarrusso <blaisorblade_personal@yahoo.it>
To: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, Neil Brown <neilb@cse.unsw.edu.au>
Subject: Re: [patch 1/1] dm: fix printk warnings about whether %lu/%Lu is right for sector_t
Date: Fri, 8 Oct 2004 22:45:39 +0200	[thread overview]
Message-ID: <200410082245.39119.blaisorblade_personal@yahoo.it> (raw)
In-Reply-To: <Pine.LNX.4.60.0410082105351.26699@hermes-1.csi.cam.ac.uk>

On Friday 08 October 2004 22:11, Anton Altaparmakov wrote:
> On Fri, 8 Oct 2004, Andrew Morton wrote:
> > blaisorblade_spam@yahoo.it wrote:


> Actually %Ld is completely wrong.  I know in the kernel it makes no
> difference but people see it in the kernel and then go off an use it in
> userspace and it generates junk output on at least some architectures.
Well, gcc does not complain, and the problem is not "kernel is special" or "on 
some arch it's different". It's an alias for "ll" for both gcc and glibc; I 
checked, in fact, the version below of info pages for glibc:

This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library
Reference Manual', for Version 2.3.x of the GNU C Library.
(I guess the "last update" is botched).

> This is because %L means "long double (floating point)" not "long long
> integer" and when you stuff an integer into it it goes wrong (on some
> architectures)... 
I think an all ones, or at least on i386.
> From the printf(3) man page: 
Outdated.
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729

  reply	other threads:[~2004-10-08 20:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-08 14:40 blaisorblade_spam
2004-10-08 19:12 ` Andrew Morton
2004-10-08 20:11   ` Anton Altaparmakov
2004-10-08 20:45     ` Paolo Giarrusso [this message]
2004-10-08 21:57       ` Anton Altaparmakov
2004-10-09  0:04         ` BlaisorBlade
2004-10-09  6:38           ` Anton Altaparmakov
2004-10-19 17:41   ` Alasdair G Kergon
2004-10-19 22:52     ` Andrew Morton
2004-10-21 15:27       ` Paolo Giarrusso

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=200410082245.39119.blaisorblade_personal@yahoo.it \
    --to=blaisorblade_personal@yahoo.it \
    --cc=aia21@cam.ac.uk \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@cse.unsw.edu.au \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®