libchardriver: fix open reply for async devices
This commit is contained in:
parent
cc1ae59c9b
commit
4498750810
3 changed files with 9 additions and 1 deletions
|
@ -133,7 +133,7 @@ PRIVATE void async_reply(message *mess, int r)
|
|||
|
||||
switch (mess->m_type) {
|
||||
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_STATUS = r;
|
||||
break;
|
||||
|
|
|
@ -545,6 +545,11 @@ PUBLIC int gen_opcl(
|
|||
r = (*dp->dmap_io)(dp->dmap_driver, &dev_mess);
|
||||
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)
|
||||
return(dev_mess.BDEV_STATUS);
|
||||
else
|
||||
|
|
|
@ -66,6 +66,9 @@ PUBLIC int main(void)
|
|||
SANITYCHECK;
|
||||
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)
|
||||
{
|
||||
endpoint_t endpt;
|
||||
|
|
Loading…
Reference in a new issue