All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@turbolabs.com>
To: Jakob Kemi <jakob.kemi@telia.com>
Cc: Linus Torvalds <torvalds@transmeta.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hex <-> int conve
Date: Tue, 19 Feb 2002 12:56:22 -0700	[thread overview]
Message-ID: <20020219125622.B25713@lynx.adilger.int> (raw)
In-Reply-To: <02021919474003.00447@jakob>
In-Reply-To: <02021919474003.00447@jakob>; from jakob.kemi@telia.com on Tue, Feb 19, 2002 at 07:47:40PM +0100

On Feb 19, 2002  19:47 +0100, Jakob Kemi wrote:
> We needed the code when parsing non-null terminated UUID strings in the LDM
> partition database (Dynamic Disks). And sscanf wouldn't work for us. Consider:
> 
> char a[3] = {'a','b'};
> char b[3] = {'a','-'};
> int x;
> sscanf(a, "%x", &x);  // undefined, could crash since a isn't null-terminated

If it is a matter of UUID parsing, just add (or use existing) function
uuid_parse() similar to that in libuuid.  Some UUID-related functions were
added to the kernel for ia64 GPM partitions, so this would just make the
UUID support in the kernel more complete.

Note that unless LDM has some serious brain-damage, there should not be any
need to have these special functions, as the user-space UUID-related code
works just fine without them.

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/


  reply	other threads:[~2002-02-19 19:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-19 18:47 [PATCH] hex <-> int conve Jakob Kemi
2002-02-19 19:56 ` Andreas Dilger [this message]
2002-02-20  0:12   ` Jakob Kemi
2002-02-20  0:37     ` Alexander Viro

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=20020219125622.B25713@lynx.adilger.int \
    --to=adilger@turbolabs.com \
    --cc=jakob.kemi@telia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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.
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.