guy@auspex.auspex.com (Guy Harris) (10/24/89)
"atk/frame/framecmd.c" has some code to put up reasonable error messages
for certain errors. It puts up a "server is down" message if the error
is ETIMEDOUT, but that code is inside "#ifdef AFS_ENV"/"#endif".
AFS isn't the only remote file system using ETIMEDOUT to report server
timeouts, though; NFS does so also. The code should probably be
protected with "#ifdef ETIMEDOUT"/"#endif" instead.
Also, it should check for, at least, EIO - yes, they do happen,
sometimes (e.g., when your machine room gets bounced around a lot,
although last time that happened it hit "init" :-)). Perhaps it should
consider using "sys_errlist" to report all other errors....
*** framecmd.c.dist Fri Oct 6 10:39:00 1989
--- framecmd.c Mon Oct 23 11:02:27 1989
***************
*** 312,323 ****
message_DisplayString(outputFrame, 0,
"Could not save file; permission denied.");
break;
! #ifdef AFS_ENV
case ETIMEDOUT:
message_DisplayString(outputFrame, 0,
"Could not save file; a server is down.");
break;
! #endif /* AFS_ENV */
#ifdef EDQUOT
case EDQUOT:
message_DisplayString(outputFrame, 0,
--- 312,323 ----
message_DisplayString(outputFrame, 0,
"Could not save file; permission denied.");
break;
! #ifdef ETIMEDOUT
case ETIMEDOUT:
message_DisplayString(outputFrame, 0,
"Could not save file; a server is down.");
break;
! #endif /* ETIMEDOUT */
#ifdef EDQUOT
case EDQUOT:
message_DisplayString(outputFrame, 0,
***************
*** 328,333 ****
--- 328,337 ----
message_DisplayString(outputFrame, 0,
"Could not save file; no space left on partition.");
break;
+ case EIO:
+ message_DisplayString(outputFrame, 0,
+ "Could not save file; an I/O error occurred on the disk.");
+ break;
case EISDIR:
message_DisplayString(outputFrame, 0,
"File not found; could not create. Attempt to write to a directory.");
***************
*** 1035,1046 ****
message_DisplayString(self, 0,
"File not found; could not create. Permission denied.");
break;
! #ifdef AFS_ENV
case ETIMEDOUT:
message_DisplayString(self, 0,
"File not found; could not create. A file server is down.");
break;
! #endif /* AFS_ENV */
/* This next case is somewhat based on internal knowledge of the buffer package... */
case EISDIR:
message_DisplayString(self, 0,
--- 1039,1054 ----
message_DisplayString(self, 0,
"File not found; could not create. Permission denied.");
break;
! #ifdef ETIMEDOUT
case ETIMEDOUT:
message_DisplayString(self, 0,
"File not found; could not create. A file server is down.");
break;
! #endif /* ETIMEDOUT */
! case EIO:
! message_DisplayString(self, 0,
! "File not found; could not create. An I/O error occurred on the disk.");
! break;
/* This next case is somewhat based on internal knowledge of the buffer package... */
case EISDIR:
message_DisplayString(self, 0,nsb@THUMPER.BELLCORE.COM (Nathaniel Borenstein) (10/24/89)
Guy is probably right, but the fix he suggested has much wider implications -- ETIMEDOUT and EIO should be checked in many many other places, too, even if AFS_ENV is not defined.