libchardriver: fix open reply for async devices
This commit is contained in:
parent
cc1ae59c9b
commit
4498750810
@ -133,7 +133,7 @@ PRIVATE void async_reply(message *mess, int r)
|
|||||||
|
|
||||||
switch (mess->m_type) {
|
switch (mess->m_type) {
|
||||||
case DEV_OPEN:
|
case DEV_OPEN:
|
||||||
reply_mess.m_type = DEV_REVIVE;
|
reply_mess.m_type = DEV_OPEN_REPL;
|
||||||
reply_mess.REP_ENDPT = mess->USER_ENDPT;
|
reply_mess.REP_ENDPT = mess->USER_ENDPT;
|
||||||
reply_mess.REP_STATUS = r;
|
reply_mess.REP_STATUS = r;
|
||||||
break;
|
break;
|
||||||
|
@ -545,6 +545,11 @@ PUBLIC int gen_opcl(
|
|||||||
r = (*dp->dmap_io)(dp->dmap_driver, &dev_mess);
|
r = (*dp->dmap_io)(dp->dmap_driver, &dev_mess);
|
||||||
if (r != OK) return(r);
|
if (r != OK) return(r);
|
||||||
|
|
||||||
|
if (op == DEV_OPEN && dp->dmap_style == STYLE_DEVA) {
|
||||||
|
fp->fp_task = dp->dmap_driver;
|
||||||
|
worker_wait(dp->dmap_driver);
|
||||||
|
}
|
||||||
|
|
||||||
if (is_bdev)
|
if (is_bdev)
|
||||||
return(dev_mess.BDEV_STATUS);
|
return(dev_mess.BDEV_STATUS);
|
||||||
else
|
else
|
||||||
|
@ -66,6 +66,9 @@ PUBLIC int main(void)
|
|||||||
SANITYCHECK;
|
SANITYCHECK;
|
||||||
get_work(); /* sets who and call_nr */
|
get_work(); /* sets who and call_nr */
|
||||||
|
|
||||||
|
if (call_nr == DEV_OPEN_REPL) /* XXX: hack to make DEV_OPEN_REPL */
|
||||||
|
call_nr = DEV_REVIVE; /* work on synchronous VFS */
|
||||||
|
|
||||||
if (call_nr == DEV_REVIVE)
|
if (call_nr == DEV_REVIVE)
|
||||||
{
|
{
|
||||||
endpoint_t endpt;
|
endpoint_t endpt;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user