Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Apr 1996 22:52:03 +1000
From:      Bruce Evans <bde@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
Message-ID:  <199604021252.WAA15288@godzilla.zeta.org.au>

next 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 :-).

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604021252.WAA15288>