ltf@killer.DALLAS.TX.US (Lance Franklin) (07/17/88)
Has anybody else noticed a problem with the scdir function under the FastFileSystem? I presently have my system set up with a harddrive formatted with the FastFileSystem...software I have written (and manx- supplied functions that use wildcards) no longer works correctly on the harddrive, although it works fine on the floppys (which, of course, are still using the old filesystem). I'm running under 1.3 Gamma Version 34.7, although that doesn't appear to be the cause of the problem, since scdir seemed to work correctly when I was running the harddrive under the old filesystem. B Luckily, I bought the Commercial Manx-C with the library sources...as far as I can tell, the problem appears to be due to the fact that scdir locks, then unlocks the path to the directory each time it's called. This is, no doubt, to avoid having the directory locked if scdir isn't allowed to scan all the files (at which point one would normally UnLock the directory). When I modified scdir to lock the directory when first called, then unlock it when the last file in the directory is found, it works quite well. I was just wondering why the FastFileSystem works differently from the old one. Just to give the Wizards a better idea of what's happening here, here's some pseudocode: /***********************************************************************/ /* scdir current logic flow...(which doesn't work) */ if (first_pass) { l = Lock(path); Examine(l,fib); if (fib->fib_DirEntryType != DIRECTORY) return(0); UnLock(l); } l = Lock(path); if (ExNext(l,fib)==0) return(0); /* under FFS, always returns 0 */ UnLock(l); return(fib->fib_FileName); /* scdir modified logic flow (which works) */ if (first_pass) { l = Lock(path); Examine(l,fib); if (fib->fib_DirEntryType != DIRECTORY) { UnLock(l); return(0); } } if (ExNext(l,fib)==0) { /* now works correctly under FFS */ UnLock(l); return(0); } return(fib->fib_FileName); /***********************************************************************/ Of course, I left out the wildcard comparisons, the error check on locks, and a few other items, but you get the general idea. Any Ideas? What does the FFS do differently from the old filesystem that would break this code? Lance P.S.: This problem occurs under Manx-C V3.40B...haven't gotten 3.6 yet... does the problem still occur? -- +------------------+ +------------------------------------------------------+ | Lance T Franklin | | Now accepting suggestions for clever, humourous or | | ltf@killer | | incredibly insightful .signature quote. Send Now! | +------------------+ +------------------------------------------------------+
papa@pollux.usc.edu (Marco Papa) (07/18/88)
In article <4827@killer.DALLAS.TX.US> ltf@killer.UUCP (Lance Franklin) writes: > >Has anybody else noticed a problem with the scdir function under the >FastFileSystem? I presently have my system set up with a harddrive >formatted with the FastFileSystem...software I have written (and manx- The Exnext bug in FFS (which would break both MANX and Lattice file searching routines) was fixed in Gamma 4 of FFS. If you are a commercial developer, you can pick it up on BIX's closed developer's conference. If you are not, well, tough luck :-) You are running unreleased software, anyway. -- Marco Papa 'Doc' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= uucp:...!pollux!papa BIX:papa ARPAnet:pollux!papa@oberon.usc.edu "There's Alpha, Beta, Gamma and Diga!" -- Leo Schwab [quoting Rick Unland] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
carolyn@cbmvax.UUCP (Carolyn Scheppner CATS) (07/20/88)
In article <10829@oberon.USC.EDU> papa@pollux.usc.edu (Marco Papa) writes: >In article <4827@killer.DALLAS.TX.US> ltf@killer.UUCP (Lance Franklin) writes: >> >>Has anybody else noticed a problem with the scdir function under the >>FastFileSystem? I presently have my system set up with a harddrive >>formatted with the FastFileSystem...software I have written (and manx- > >The Exnext bug in FFS (which would break both MANX and Lattice file searching >routines) was fixed in Gamma 4 of FFS. If you are a commercial developer, >you can pick it up on BIX's closed developer's conference. If you are not, >well, tough luck :-) You are running unreleased software, anyway. The fix went in the Omega 4 FFS, not Gamma 4. WBO4FFS.arc is available on BIX to any registered developer. I have a separate closed area called amiga.update where Certifieds have a link to the amiga.com (Commercial dev conference) listings. To gain access, send me BIXmail on BIX with your Name [company] and Developer#, and I'll admit you to the appropriate closed area. (on BIX, I am cscheppner) Please do not send me email here asking me to mail it to you. Please. -- ========================================================================== Carolyn Scheppner -- CATS Commodore Amiga Technical Support PHONE 215-431-9180 UUCP ...{uunet,allegra,rutgers}!cbmvax!carolyn Reentrant code - the only way to fly. ==========================================================================