make_dev & cdevsw_add (Is there anyone that could answer this ?)
rp
rp at telemach.net
Thu Oct 30 12:01:41 PST 2003
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
More information about the freebsd-hackers
mailing list