make_dev & cdevsw_add (Is there anyone that could answer this ?)

From: rp (rp_at_telemach.net)
Date: 10/30/03

  • Next message: Leo Bicknell: "Re: 5.x kernel config changes?"
    Date: Thu, 30 Oct 2003 21:01:25 +0100
    To: freebsd-hackers@freebsd.org
    
    

    Hello (again)!

    I would kindly request explanation on how are cdevsw_add and
    make_dev related ? Maybe short example also with focus on
    cdevsw_add. Thing is i do not understand the function of
    cdevsw_add when i have make_dev.

    Also if there is any real good document that describes most
    of cdev related stuff i would appriciate if someone gives me
    an url.

    Second thing that i would like to know is:

    struct cdevsw {
            d_open_t *d_open;

    When a process calls open on character device and d_open
    function is called would it be possible to determine the
    file descriptor returned by the open system call on that
    device that is returned to the process from d_open ? That
    is i would like to implement character device that wouldn't
    require /dev/somedev[0-9]+ number of devices but only /dev/somedev
    and would identify the open/close/ read/write operations
    by pid and fd instead of dev_t's minor number.

    re
    RP

    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: Leo Bicknell: "Re: 5.x kernel config changes?"