Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Nov 1998 14:04:54 -0800
From:      Mike Smith <mike@smith.net.au>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        mike@smith.net.au (Mike Smith), hackers@FreeBSD.ORG
Subject:   Re: scanf in the kernel? 
Message-ID:  <199811012204.OAA06090@dingo.cdrom.com>
In-Reply-To: Your message of "Sun, 01 Nov 1998 21:46:38 GMT." <199811012146.OAA27534@usr05.primenet.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > Just wondering what the general feeling would be about having scanf in 
> > the kernel?  As we move towards more abstract representations of things 
> > (eg. device names), it's becoming more important to be able to parse 
> > strings inside the kernel.
> > 
> > Doing this in hand-rolled code is tedious, error-prone and results in
> > code that can be hard to read and maintain (as everyone does it their
> > own way).
> > 
> > If this isn't totally repulsive, I'll roll a somewhat smaller version 
> > of the libc vfscanf for general approval.
> 
> I have to say that it's repulsive.
> 
> In general, the only place strings should probably be used in the
> kernel at all are in filesystem namespace exposures.

You're internally inconsistent.  Last time you decided you liked 
strings over manifest constants.

> I think it is a mistake for FreeBSD to turn into Plan9.

I think it's a mistake for us to make any technical decisions on 
emotional or us'n'them grounds.

There are instances where it's clearly useful to be able to process
string format data (eg. the SCSI quirk code).  The necessity for this
combined with the lack of formal string parsing has led to the
implementation of any number of ad-hoc solutions.  If you want to argue 
for the removal of all string processing in the kernel, you need to 
explain how all of these existing functions are going to work.


-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811012204.OAA06090>