one step further:
-----
magic grant verify failed: granter (4975488) is not FS (1)
-----
so, only FS can magic grant? alternatives?
This is a discussion on cpf_grant_magic - Minix ; hi all! i'll try to talk to "at_wini" from another driver, but it not really works.. mess.m_type = DEV_IOCTL_S; mess.REQUEST = DIOCGETP; size = _MINIX_IOCTL_SIZE(mess.REQUEST); if((*gid = cpf_grant_magic(driver_e,getprocnr(), (vir_bytes)part, size, CPF_READ | CPF_WRITE)) panic(__FILE__, "dm: error: getsize: cpf_grant_direct of vector ...
hi all!
i'll try to talk to "at_wini" from another driver, but it not really
works..
mess.m_type = DEV_IOCTL_S;
mess.REQUEST = DIOCGETP;
size = _MINIX_IOCTL_SIZE(mess.REQUEST);
if((*gid = cpf_grant_magic(driver_e,getprocnr(),
(vir_bytes)part, size,
CPF_READ | CPF_WRITE)) < 0) {
panic(__FILE__,
"dm: error: getsize: cpf_grant_direct of vector failed", NO_NUM);
}
mess.DEVICE = (dev >> MINOR) & BYTE;
mess.IO_ENDPT = getprocnr();
mess.IO_GRANT = (char*)gid;
mess.COUNT = size;
mess.ADDRESS = (char*)part;
r=sendrec(driver_e,&mess);
answer is -22 /* invalid argument */
any hint what i'm doing wrong here?
thx,
markus.
one step further:
-----
magic grant verify failed: granter (4975488) is not FS (1)
-----
so, only FS can magic grant? alternatives?
solution is cpf_grant_direct and to not set mess.COUNT