I am adding code to an existing FreeBSD device driver, and I am trying to pass char*from user space to the driver. I implemented a custom command ioctl()using a macro _IOWas follows:#define TIBLOOMFILTER _IOW(0,253,char*)
My call looks something like this:
int file_desc = open("/dev/ti0", O_RDWR);
ioctl(file_desc, TIBLOOMFILTER, (*filter).getBitArray());
close(file_desc);
When I call ioctl(), I get: Inappropriate ioctl for deviceas an error message. Any guess on what might be doing wrong? I defined the same macro in my device driver and added it to the statement case.
source
share