Hello!
I have:
int ziva_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct
proc* pr)
when this function catches a ioctl from userspace, called as:
int foo = 199;
ioctl(fd, 10, &foo);
the u_long cmd contains 10, which is correct (so the ioctl-handler is
called correctly).
However, I can't get the value of the int.
I tried something like:
if (*((int *) arg) == 199)
<bleh>.
But this doesn't work, <bleh> is not executed. Somehow, I can't access
the memory this way.
Anyone knows, what I'm doing wrong?
Thanks
Alex
--
I need a new ~/.sig.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message