From owner-freebsd-hackers Fri Oct 30 15:31:27 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA09144 for freebsd-hackers-outgoing; Fri, 30 Oct 1998 15:31:27 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from etinc.com (et-gw.etinc.com [207.252.1.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA09139 for ; Fri, 30 Oct 1998 15:31:25 -0800 (PST) (envelope-from dennis@etinc.com) Received: from dbsys (dbsys.etinc.com [207.252.1.18]) by etinc.com (8.8.8/8.6.9) with SMTP id SAA28485; Fri, 30 Oct 1998 18:30:52 GMT Message-Id: <199810301830.SAA28485@etinc.com> X-Sender: dennis@etinc.com X-Mailer: QUALCOMM Windows Eudora Pro Version 4.0 Date: Fri, 30 Oct 1998 18:44:25 -0500 To: Archie Cobbs From: Dennis Subject: Re: scanf in the kernel? Cc: hackers@FreeBSD.ORG In-Reply-To: <199810302100.NAA18888@bubba.whistle.com> References: <199810301814.KAA16349@bubba.whistle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG At 01:00 PM 10/30/98 -0800, you wrote: >Archie Cobbs writes: >> > 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. > >Also- >Seems like the kernel was missing memmove(), memcpy(), and/or memset() >at some point. I like using these better than bcopy()/bzero() because >they are more ANSI and portable... #define memcpy(d,s,n) bcopy(s,d,n) not exactly rocket science :-) sscanf..you lazy bastard....although I am pleased as punch that printf now supports leading zeros...when did that happen? db Emerging Technologies, Inc. http://www.etinc.com ISA and PCI T1/V35/HSSI Cards for FreeBSD, LINUX and BSD/OS Bandwidth Manager http://www.etinc.com/bwmgr.htm To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message