Re: per-device sysctls

From: John Baldwin (john_at_baldwin.cx)
Date: 02/27/04

  • Next message: Pawel Jakub Dawidek: "rcNG and jail."
    To: arch@FreeBSD.org
    Date: Fri, 27 Feb 2004 10:07:43 -0500
    
    

    On Friday 27 February 2004 07:16 am, Bruce Evans wrote:
    > On Thu, 26 Feb 2004, Dag-Erling [iso-8859-1] Smørgrav wrote:
    > > "M. Warner Losh" <imp@bsdimp.com> writes:
    > > > How is this different than the sysctl stuff that already exsists for
    > > > this and is accessed by devinfo?
    > >
    > > 1) it is immensely easier to access
    > >
    > > 2) it gives drivers a well-defined place to put their per-device
    > > sysctl variables - devinfo doesn't address that issue at all
    >
    > Only broken drivers use sysctl variables. ioctl(3) is a much better
    > interface that sysctl(3) for accessing per-device info. sysctl(8) is
    > a better interface than ioctl(8) for handling the few device control
    > things that can be done in a generic way, but this is only because
    > there are so few such things that ioctl(8) doesn't exist.

    Note that ioctl's act on dev_t devices, not on device_t devices. We have two
    distinct notions of a device right now: physical hardware devices (new-bus)
    and UNIX file devices (entries in /dev). You can ioctl the latter, but not
    necessarily the former.

    -- 
    John Baldwin <john@baldwin.cx>  <><  http://www.baldwin.cx/~john/
    "Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
    

  • Next message: Pawel Jakub Dawidek: "rcNG and jail."

    Relevant Pages

    • Re: [PATCH] driver core: Separate platform device name from platform device number
      ... interface in both the kernel _and_ all the applications. ... on the first entry isn't 0, it's -1, which indicates it's a singleton. ... better to just fix the broken drivers.. ...
      (Linux-Kernel)
    • Re: Sysctl Naming
      ... I am wanting to create a number of sysctl variables at kernel boot time, ... for each network interface. ... I have the code set up to loop through the ...
      (freebsd-hackers)
    • Sysctl Naming
      ... I am wanting to create a number of sysctl variables at kernel boot time, ... each network interface. ... I have the code set up to loop through the interfaces ...
      (freebsd-hackers)
    • Re: per-device sysctls
      ... >> 1) it is immensely easier to access ... >Only broken drivers use sysctl variables. ... >a better interface than ioctlfor handling the few device control ...
      (freebsd-arch)