I guess you created a device file (with mode S_IFCHR or S_IFBLK, other-Quote:> I try to create character special file with major and minor numbers.
> mknod() is working perfectly with errno=0;
> but I could not open that character file for RDWR.
wise major and minor device number wouldn't make sense). Thich means
that the system expects that there is a driver that deals with accesses
to this file (open, close, read, write etc.). At least on Linux, but
probably also on other systems, the driver to invoke is determined from
the major device number. If you just create a device file with a random
major device number there probably is no driver for handling of accesses
to this file and so opening it will fail. Did you check errno for the
open() call and what did it say? Is it ENXIO or ENODEV?
_ _____ _____
_ | | | | | | AG Moebius, Institut fuer Molekuelphysik
| |_| | | | | | Fachbereich Physik, Freie Universitaet Berlin
\___/ens|_|homs|_|oerring Tel: ++49 (0)30 838 - 53394 / FAX: - 56046