Patch #: 7.0 Type: interim workaround for System 7.0 Priority: very high Affects: anyone trying to delete a file from AUFS server Reported: Mike Moya Assistance: Mike Bell, Apple Computer Developer Tech Support Archived: munnari.OZ.AU mac/cap.patches/cap60.patch007 Summary: Mac "hangs" attempting a read-only byte-range-lock File: cap60/applications/aufs/afpos.c File: cap60/lib/afp/afposlock.c *** applications/aufs/afpos.c.orig Tue May 7 20:47:57 1991 --- applications/aufs/afpos.c Tue May 7 20:49:48 1991 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 91/03/20 17:28:44 $ ! * $Header: afpos.c,v 2.3 91/03/20 17:28:44 djh Exp $ ! * $Revision: 2.3 $ */ /* --- 1,7 ---- /* ! * $Author: djh $ $Date: 1991/05/07 10:49:34 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpos.c,v 2.4 1991/05/07 10:49:34 djh Exp djh $ ! * $Revision: 2.4 $ */ /* *************** *** 2668,2673 **** --- 2668,2681 ---- } else if (mode & OFK_MRD) { ms = "Read"; mo = O_RDONLY; + } + + /* This is a special case hack for use with System 7.0 */ + if (*file == 'T') { /* improve performance a little */ + if (strcmp(file, "Trash Can Usage Map") == 0) { + ms = "Read/Write"; + mo = O_RDWR; + } } if (DBOSI) *** lib/afp/afposlock.c.orig Tue May 7 01:18:27 1991 --- lib/afp/afposlock.c Tue May 7 01:35:24 1991 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 91/03/13 19:44:17 $ ! * $Header: afposlock.c,v 2.2 91/03/13 19:44:17 djh Exp $ ! * $Revision: 2.2 $ */ /* --- 1,7 ---- /* ! * $Author: djh $ $Date: 1991/05/06 15:34:51 $ ! * $Header: /mac/src/cap60/lib/afp/RCS/afposlock.c,v 2.3 1991/05/06 15:34:51 djh Exp djh $ ! * $Revision: 2.3 $ */ /* *************** *** 113,120 **** { #ifdef DEBUG printf("OS Byte Range lock: unimplemented on this OS\n"); ! #endif return(aeMiscErr); } OSErr --- 113,123 ---- { #ifdef DEBUG printf("OS Byte Range lock: unimplemented on this OS\n"); ! #endif DEBUG ! #ifdef notdef return(aeMiscErr); + #endif notdef + return(aeParamErr); /* specially for System 7.0 */ } OSErr *************** *** 172,203 **** /* not sure if this is the best thing to do */ case EREMOTE: return(noErr); ! #endif #ifdef notdef return(aeRangeNotLocked); return(aeRangeOverlap); ! #endif case EACCES: case EAGAIN: #ifdef EINTR case EINTR: ! #endif return(aeLockErr); #ifdef EBADF case EBADF: /* SunOS */ ! #endif /* really permission denied (or, unlikely: bad file) */ #ifndef gould #ifdef ENOLCK /* sunos */ case ENOLCK: ! #endif #endif gould #ifdef EDEADLK case EDEADLK: ! #endif return(aeNoMoreLocks); default: ! return(aeParamErr); } } return(noErr); --- 175,210 ---- /* not sure if this is the best thing to do */ case EREMOTE: return(noErr); ! #endif EREMOTE #ifdef notdef return(aeRangeNotLocked); return(aeRangeOverlap); ! #endif notdef case EACCES: case EAGAIN: #ifdef EINTR case EINTR: ! #endif EINTR ! #ifdef notdef return(aeLockErr); + #endif notdef #ifdef EBADF case EBADF: /* SunOS */ ! #endif EBADF /* really permission denied (or, unlikely: bad file) */ #ifndef gould #ifdef ENOLCK /* sunos */ case ENOLCK: ! #endif ENOLCK #endif gould #ifdef EDEADLK case EDEADLK: ! #endif EDEADLK ! #ifdef notdef return(aeNoMoreLocks); + #endif notdef default: ! return(aeParamErr); /* specially for System 7.0 */ } } return(noErr); *** README.orig Wed May 8 20:50:59 1991 --- README Wed May 8 20:51:12 1991 *************** *** 3,9 **** (For use with AppleTalk/Ethernet bridge) o RELEASE NOTES ! o CAP Distribution 6.0, Patch Level 6, May 1991 Introduction ------------ --- 3,9 ---- (For use with AppleTalk/Ethernet bridge) o RELEASE NOTES ! o CAP Distribution 6.0, Patch Level 7, May 1991 Introduction ------------