From owner-freebsd-hackers Fri Oct 30 10:50:53 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA11982 for freebsd-hackers-outgoing; Fri, 30 Oct 1998 10:50:53 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA11974 for ; Fri, 30 Oct 1998 10:50:50 -0800 (PST) (envelope-from julian@whistle.com) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id KAA21296; Fri, 30 Oct 1998 10:45:47 -0800 (PST) Received: from current1.whistle.com(207.76.205.22) via SMTP by alpo.whistle.com, id smtpdW21290; Fri Oct 30 18:45:43 1998 Date: Fri, 30 Oct 1998 10:45:23 -0800 (PST) From: Julian Elischer To: Mike Smith cc: hackers@FreeBSD.ORG Subject: Re: scanf in the kernel? In-Reply-To: <199810300813.AAA01726@dingo.cdrom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Yes we have already seveal places that do this sort of thing.. e.g. matching device/manufacturer strings in teh CAM and SCSI systems. On Fri, 30 Oct 1998, Mike Smith wrote: > > 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. > > -- > \\ 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 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message