From owner-freebsd-hackers Sat Nov 18 00:52:07 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id AAA03667 for hackers-outgoing; Sat, 18 Nov 1995 00:52:07 -0800 Received: from cls.net (freeside.cls.de [192.129.50.1]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id AAA03651 for ; Sat, 18 Nov 1995 00:52:02 -0800 Received: by mail.cls.net (Smail3.1.29.1) from allegro.lemis.de (192.109.197.134) with smtp id ; Sat, 18 Nov 95 08:52 GMT From: grog@lemis.de (Greg Lehey) Organisation: LEMIS, Schellnhausen 2, 36325 Feldatal, Germany Phone: +49-6637-919123 Fax: +49-6637-919122 Reply-To: grog@lemis.de (Greg Lehey) Received: (grog@localhost) by allegro.lemis.de (8.6.9/8.6.9) id JAA16883; Sat, 18 Nov 1995 09:48:45 +0100 Message-Id: <199511180848.JAA16883@allegro.lemis.de> Subject: Re: linux' mknod and named pipes. To: bde@zeta.org.au (Bruce Evans) Date: Sat, 18 Nov 1995 09:48:45 +0100 (MET) Cc: hackers@freebsd.org (FreeBSD Hackers) In-Reply-To: <199511162213.JAA05714@godzilla.zeta.org.au> from "Bruce Evans" at Nov 17, 95 09:13:33 am X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Length: 1393 Sender: owner-hackers@freebsd.org Precedence: bulk Bruce Evans writes: > > >> > It runs and is playable but the sound doesn't work > >> > ktrace shows it fails trying to make a pipe in /tmp with > >> > mknod(). FreeBSD's mknod is different enough to not > >> > let this work. Any ideas? > >> > >> Sure, turn mknod(arg,arg1,0) into a bsd mkfifo call anything else for now > ^^^POSIX > >> just pass it thru to mknod 8) > > >Is there any good reason why we shouldn't modify mknod to make a fifo > >when called with the appropriate parameters? > > The same reason we shouldn't modify thousands of other system calls to be > compatible with thousands of other systems: it takes longer and gives > worse results. I think that bears discussion. 1. It takes longer: --- vfs_syscalls.c 1995/11/14 09:19:16 1.40 +++ vfs_syscalls.c 1995/11/18 08:45:43 @@ -757,6 +757,13 @@ int error; struct nameidata nd; + if (ISFIFO (uap->mode)) + { + struct mkfifo_args args; + args.path = uap->path; + args.mode = uap->mode; + return mkfifo (p, args); + } error = suser(p->p_ucred, &p->p_acflag); if (error) return (error); OK, I haven't tested this, but it's got to be something like it. In the normal case, there's a single 'if' involved. 2. It gives worse results. How? Why? Greg