I'm writing a simple char device. So far everything went so good
(read/write), but here I'm going to add support for ioctl.

int
ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td)
{
       int error = 0;
       uprintf("Here...\n");
       return(error);
}
and I'm calling it here:

len = ioctl(cd, 0, "");
perror("ioctl");

but when runnig it says:

ioctl: Inappropriate ioctl for device

where's the problem?
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to