mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Paul Schutte <sjpschutte@gmail.com>
To: musl@lists.openwall.com
Subject: Re: Trouble with sscanf
Date: Fri, 16 Nov 2012 17:46:41 +0200	[thread overview]
Message-ID: <CAKHv7ph3bn93ZX6X7zeF0L3-vLBgDeULJK-OtYaag-dwXDLn=w@mail.gmail.com> (raw)
In-Reply-To: <20121116153921.GJ12537@port70.net>

[-- Attachment #1: Type: text/plain, Size: 600 bytes --]

Thanks.

BTW. This code that I just showed you is what you run every time you use
top, ps, vmstat on Debian or Ubuntu.

Regards
Paul

On Fri, Nov 16, 2012 at 5:39 PM, Szabolcs Nagy <nsz@port70.net> wrote:

> * Paul Schutte <sjpschutte@gmail.com> [2012-11-16 17:28:57 +0200]:
> >       sscanf(b,  "cpu  %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu", &cuse, &cice,
> &csys, &cide, &ciow, &cxxx, &cyyy, &czzz);
>
> there is no L length modifier for ints
>
> L is for long double formatting (%Lf %Lg %Le ...)
> i guess musl returns an early matching error
> but they don't check for that
>
> rewrite it to use %llu
>

[-- Attachment #2: Type: text/html, Size: 1027 bytes --]

  reply	other threads:[~2012-11-16 15:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-16 15:28 Paul Schutte
2012-11-16 15:39 ` Szabolcs Nagy
2012-11-16 15:46   ` Paul Schutte [this message]
2012-11-16 15:53     ` John Spencer
2012-11-16 15:49   ` Szabolcs Nagy

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='CAKHv7ph3bn93ZX6X7zeF0L3-vLBgDeULJK-OtYaag-dwXDLn=w@mail.gmail.com' \
    --to=sjpschutte@gmail.com \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).