Date: Sun, 1 Nov 1998 21:46:38 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: mike@smith.net.au (Mike Smith) Cc: hackers@FreeBSD.ORG Subject: Re: scanf in the kernel? Message-ID: <199811012146.OAA27534@usr05.primenet.com> In-Reply-To: <199810300813.AAA01726@dingo.cdrom.com> from "Mike Smith" at Oct 30, 98 00:13:48 am
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. Even then, I have to say that NFS is utterly bogus in the use of pushing strings across the user/kernel boundary for the exported FS list. In general, I have to say that I rather like the fact that Linux has one use of copyinstr -- and does nto have a general copyinstr as a result, but only a copy in for the path data for an FS path lookup. I think it is a mistake for FreeBSD to turn into Plan9. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. 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?199811012146.OAA27534>