From owner-cvs-share Tue Apr 2 04:58:51 1996 Return-Path: owner-cvs-share Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id EAA19140 for cvs-share-outgoing; Tue, 2 Apr 1996 04:58:51 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id EAA19100 Tue, 2 Apr 1996 04:58:32 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id WAA15288; Tue, 2 Apr 1996 22:52:03 +1000 Date: Tue, 2 Apr 1996 22:52:03 +1000 From: Bruce Evans Message-Id: <199604021252.WAA15288@godzilla.zeta.org.au> To: CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-share@freefall.freebsd.org, scrappy@freefall.freebsd.org Subject: Re: cvs commit: src/share/man/man9 devfs_add_devswf.9 Makefile devfs_link.9 devfs_add_devsw.9 Sender: owner-cvs-share@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Modified: share/man/man9 Makefile devfs_link.9 > Added: share/man/man9 devfs_add_devswf.9 > Removed: share/man/man9 devfs_add_devsw.9 > Log: > Makefile: added devfs_add_devswf.9, removed devfs_add_devsw.9 > > devfs_link.9: modified man page to reflect source code > > devfs_add_devsw.9: replaced by devfs_add_devswf.9 > > devfs_add_devswf.9: proper function for adding devices to DEVFS Joerg must want to kill section 9 to choose the devfs functions for documenting first :-). devfs is under active development and its external interface was inconvenient and wrong so it was certain to change. Now it is wrong and is certain to change :-). The next step is to finish the changes so that the code matches the man pages. devfs_link() is misdeclared in devfsext.h. Stuff involving the link function has been broken for several days because of the confusing names (dev_link vs dev_linkf vs devfs_link). Future interface changes should include: - nuke devfs_add_devsw and rename devfs_add_devswf to devfs_add_devsw - rename devfs_add_devsw to something shorter - nuke the uid, gid and permissions args to devfs_add_devsw. Drivers shouldn't decide policy. - declare the string args as const. - perhaps drop support for links, at least at the driver level. Linked devices in /dev are undesirable because programs can't tell which ones were opened and this is sometimes important (e.g. for terminal names). OTOH, unlinked nodes for the same devices are even less desirable because they break first-open/last-close semantics. The duplication of the node for /dev/stdin in /dev/fd/0 in MAKEDEV is a bug. It seems reasonable to at least push the creation of the links outside of the driver and not depend on them by default. devfs_link() is currently only used for disks and tapes. Bruce