hi all!
struct A {
int dummy;
};
_IORW('x', 1, struct A)
works fine.
now i've to submit a data-structure which size is not know at compile
time. like:
struct B {
int size;
char *buffer;
}
_IORW('x', 1, struct B) does not work, because only sizeof(struct B)
bytes are granted to submit.
think I need something like:
#define _IORWxx(x,y,t) ((x << 8) | y | ((t->size) & _IOCPARM_MASK)
<< 16) | _IOC_INOUT)
(which does clearly not work!)
(was: #define _IORW(x,y,t) ((x << 8) | y | ((sizeof(t) &
_IOCPARM_MASK) << 16) | _IOC_INOUT))
ideas?
thx.
markus
(in linux they transfer the ioctl request at a constant size and
access B->size bytes from client afterwards. (copy_from_user()))