No more E{SRC,DST}DIED errno's, replaced by EDEADSRCDST.
The callers don't care about the difference and had to check 3 error codes instead of one.
This commit is contained in:
parent
eedff09bfd
commit
adf0b6fb26
5 changed files with 8 additions and 13 deletions
|
@ -564,8 +564,7 @@ static int check_senda(int which)
|
||||||
|
|
||||||
amp = &amsgtable[which];
|
amp = &amsgtable[which];
|
||||||
|
|
||||||
if ((amp->flags & AMF_DONE) &&
|
if ((amp->flags & AMF_DONE) && (amp->result == EDEADSRCDST)) {
|
||||||
(amp->result == EDEADSRCDST || amp->result == EDSTDIED)) {
|
|
||||||
|
|
||||||
return BD_DEAD;
|
return BD_DEAD;
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,8 +119,6 @@ extern int errno; /* place where the error numbers go */
|
||||||
#define EDEADSRCDST (_SIGN 105) /* source or destination is not alive */
|
#define EDEADSRCDST (_SIGN 105) /* source or destination is not alive */
|
||||||
#define ENOTREADY (_SIGN 106) /* source or destination is not ready */
|
#define ENOTREADY (_SIGN 106) /* source or destination is not ready */
|
||||||
#define EBADREQUEST (_SIGN 107) /* destination cannot handle request */
|
#define EBADREQUEST (_SIGN 107) /* destination cannot handle request */
|
||||||
#define ESRCDIED (_SIGN 108) /* source just died */
|
|
||||||
#define EDSTDIED (_SIGN 109) /* destination just died */
|
|
||||||
#define ETRAPDENIED (_SIGN 110) /* IPC trap not allowed */
|
#define ETRAPDENIED (_SIGN 110) /* IPC trap not allowed */
|
||||||
#define EDONTREPLY (_SIGN 201) /* pseudo-code: don't send a reply */
|
#define EDONTREPLY (_SIGN 201) /* pseudo-code: don't send a reply */
|
||||||
|
|
||||||
|
|
|
@ -188,7 +188,7 @@ int flags; /* special flags, like O_NONBLOCK */
|
||||||
driver_e = driver_endpoints[(dev >> MAJOR) & BYTE].driver_e;
|
driver_e = driver_endpoints[(dev >> MAJOR) & BYTE].driver_e;
|
||||||
|
|
||||||
/* See if driver is roughly valid. */
|
/* See if driver is roughly valid. */
|
||||||
if (driver_e == NONE) return(EDSTDIED);
|
if (driver_e == NONE) return(EDEADSRCDST);
|
||||||
|
|
||||||
/* The io vector copying relies on this I/O being for FS itself. */
|
/* The io vector copying relies on this I/O being for FS itself. */
|
||||||
if(proc_e != SELF_E) {
|
if(proc_e != SELF_E) {
|
||||||
|
@ -229,7 +229,7 @@ int flags; /* special flags, like O_NONBLOCK */
|
||||||
* - VFS sends the new driver endp for the FS proc and the request again
|
* - VFS sends the new driver endp for the FS proc and the request again
|
||||||
*/
|
*/
|
||||||
if (r != OK) {
|
if (r != OK) {
|
||||||
if (r == EDEADSRCDST || r == EDSTDIED || r == ESRCDIED) {
|
if (r == EDEADSRCDST) {
|
||||||
printf("ISOFS(%d) dead driver %d\n", SELF_E, driver_e);
|
printf("ISOFS(%d) dead driver %d\n", SELF_E, driver_e);
|
||||||
driver_endpoints[(dev >> MAJOR) & BYTE].driver_e = NONE;
|
driver_endpoints[(dev >> MAJOR) & BYTE].driver_e = NONE;
|
||||||
return(r);
|
return(r);
|
||||||
|
@ -302,7 +302,7 @@ message *mess_ptr; /* pointer to message for task */
|
||||||
|
|
||||||
r = sendrec(task_nr, mess_ptr);
|
r = sendrec(task_nr, mess_ptr);
|
||||||
if (r != OK) {
|
if (r != OK) {
|
||||||
if (r == EDEADSRCDST || r == EDSTDIED || r == ESRCDIED) {
|
if (r == EDEADSRCDST) {
|
||||||
printf("fs: dead driver %d\n", task_nr);
|
printf("fs: dead driver %d\n", task_nr);
|
||||||
panic(__FILE__, "should handle crashed drivers",
|
panic(__FILE__, "should handle crashed drivers",
|
||||||
NO_NUM);
|
NO_NUM);
|
||||||
|
|
|
@ -178,7 +178,7 @@ int flags; /* special flags, like O_NONBLOCK */
|
||||||
/* See if driver is roughly valid. */
|
/* See if driver is roughly valid. */
|
||||||
if (driver_e == NONE) {
|
if (driver_e == NONE) {
|
||||||
printf("MFS(%d) block_dev_io: no driver for dev %x\n", SELF_E, dev);
|
printf("MFS(%d) block_dev_io: no driver for dev %x\n", SELF_E, dev);
|
||||||
return(EDSTDIED);
|
return(EDEADSRCDST);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The io vector copying relies on this I/O being for FS itself. */
|
/* The io vector copying relies on this I/O being for FS itself. */
|
||||||
|
@ -220,7 +220,7 @@ int flags; /* special flags, like O_NONBLOCK */
|
||||||
* - VFS sends the new driver endp for the FS proc and the request again
|
* - VFS sends the new driver endp for the FS proc and the request again
|
||||||
*/
|
*/
|
||||||
if (r != OK) {
|
if (r != OK) {
|
||||||
if (r == EDEADSRCDST || r == EDSTDIED || r == ESRCDIED) {
|
if (r == EDEADSRCDST) {
|
||||||
printf("MFS(%d) dead driver %d\n", SELF_E, driver_e);
|
printf("MFS(%d) dead driver %d\n", SELF_E, driver_e);
|
||||||
driver_endpoints[(dev >> MAJOR) & BYTE].driver_e = NONE;
|
driver_endpoints[(dev >> MAJOR) & BYTE].driver_e = NONE;
|
||||||
return r;
|
return r;
|
||||||
|
@ -329,7 +329,7 @@ message *mess_ptr; /* pointer to message for task */
|
||||||
|
|
||||||
r = sendrec(task_nr, mess_ptr);
|
r = sendrec(task_nr, mess_ptr);
|
||||||
if (r != OK) {
|
if (r != OK) {
|
||||||
if (r == EDEADSRCDST || r == EDSTDIED || r == ESRCDIED) {
|
if (r == EDEADSRCDST) {
|
||||||
printf("fs: dead driver %d\n", task_nr);
|
printf("fs: dead driver %d\n", task_nr);
|
||||||
panic(__FILE__, "should handle crashed drivers",
|
panic(__FILE__, "should handle crashed drivers",
|
||||||
NO_NUM);
|
NO_NUM);
|
||||||
|
|
|
@ -158,8 +158,6 @@ PUBLIC void dev_status(message *m)
|
||||||
if ((r = sendrec(m->m_source, &st)) != OK) {
|
if ((r = sendrec(m->m_source, &st)) != OK) {
|
||||||
printf("DEV_STATUS failed to %d: %d\n", m->m_source, r);
|
printf("DEV_STATUS failed to %d: %d\n", m->m_source, r);
|
||||||
if (r == EDEADSRCDST) return;
|
if (r == EDEADSRCDST) return;
|
||||||
if (r == EDSTDIED) return;
|
|
||||||
if (r == ESRCDIED) return;
|
|
||||||
panic(__FILE__,"couldn't sendrec for DEV_STATUS", r);
|
panic(__FILE__,"couldn't sendrec for DEV_STATUS", r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -619,7 +617,7 @@ message *mess_ptr; /* pointer to message for task */
|
||||||
proc_e = mess_ptr->IO_ENDPT;
|
proc_e = mess_ptr->IO_ENDPT;
|
||||||
r = sendrec(task_nr, mess_ptr);
|
r = sendrec(task_nr, mess_ptr);
|
||||||
if (r != OK) {
|
if (r != OK) {
|
||||||
if (r == EDEADSRCDST || r == EDSTDIED || r == ESRCDIED) {
|
if (r == EDEADSRCDST) {
|
||||||
printf("fs: dead driver %d\n", task_nr);
|
printf("fs: dead driver %d\n", task_nr);
|
||||||
dmap_unmap_by_endpt(task_nr);
|
dmap_unmap_by_endpt(task_nr);
|
||||||
return(r);
|
return(r);
|
||||||
|
|
Loading…
Reference in a new issue