From: David van Moolenbroek Date: Wed, 7 Jul 2010 11:04:33 +0000 (+0000) Subject: libdriver: don't panic so easily X-Git-Tag: v3.1.8~271 X-Git-Url: http://zhaoyanbai.com/repos/doc/mandoc_char.7.html?a=commitdiff_plain;h=8182a9d97250cf332eb2ae8dc14dd3dba2bf0066;p=minix.git libdriver: don't panic so easily --- diff --git a/lib/libdriver/driver.c b/lib/libdriver/driver.c index 36912faef..cb7655837 100644 --- a/lib/libdriver/driver.c +++ b/lib/libdriver/driver.c @@ -502,7 +502,8 @@ message *mp; /* pointer to read or write message */ if (OK != sys_safecopyfrom(mp->m_source, (vir_bytes) mp->IO_GRANT, 0, (vir_bytes) iovec, iovec_size, D)) { - panic("bad I/O vector by: %d", mp->m_source); + printf("bad I/O vector by: %d\n", mp->m_source); + return(EINVAL); } /* Prepare for I/O. */ @@ -516,7 +517,8 @@ message *mp; /* pointer to read or write message */ /* Copy the I/O vector back to the caller. */ if (OK != sys_safecopyto(mp->m_source, (vir_bytes) mp->IO_GRANT, 0, (vir_bytes) iovec, iovec_size, D)) { - panic("couldn't return I/O vector: %d", mp->m_source); + printf("couldn't return I/O vector: %d\n", mp->m_source); + return(EINVAL); } return(r);