Date: Tue, 2 Apr 1996 11:20:31 -0800 (PST) From: "JULIAN Elischer" <julian@ref.tfs.com> To: bde@zeta.org.au (Bruce Evans) Cc: 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 Message-ID: <199604021920.LAA07528@ref.tfs.com> In-Reply-To: <199604021252.WAA15288@godzilla.zeta.org.au> from "Bruce Evans" at Apr 2, 96 10:52:03 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> > > > 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 :-). well it's not SOOO wrong in my opinion.. > > 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). Ok we can certainly clear up things and there are changes we can do for sure (e.g. possibly add named-pipe support) > > 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 the original devfs_add_devsw is called that, so as to distinguish it from devfs_add_vnops(), which adds a devfs node that bypasses the devsw table entirely and instead has a direct set of vnops that track direct to the driver. This would do away with major numbers entirely. > - nuke the uid, gid and permissions args to devfs_add_devsw. Drivers > shouldn't decide policy. hmmmm I dissagree. the drivers should be able to set reasonable defaults. > - declare the string args as const. sure > - 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. The links are important in the grand view of things I hope eventually to be able to do something about vnode liasing using them... I'm philosophically against the same device having two different nodes. It leads to all thealiasing code and in my opinion breaks REAL unix semantics, as two names to the same object can have differnt permissions etc. some consider this a feature. I consider it a bug. > > Bruce >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604021920.LAA07528>