News about CSAP - how to investigate further (please do!)
Eric Auer <[email protected]>
| Newsgroups | gmane.os.freedos.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, as CSAP just refused to work for George with MS DOS 7, we found that it uses partially undocumented DPB fields to figure out how big each FAT is and where the root directory starts. If somebody could insert code at line 282 of CSAP.C to print the results of those calculations and then exit, and compare the results with those of my UNDELETE tool (e.g. use: ... hm, undelete /? | more should be enough!), that would be nice. If it turns out that CSAP gets the values wrong, we can change it to use the UNDELETE style to calculate them. Sample output of undelete /?: Warning: 5by/sec Sec per FAT not as predicted??? Predicted 144, but boot indicates 92 Drive C: info: maxsecinclust=254 shlclusttosec=7 numressec=53, fats=235, rootdirents=598 firstdatasec=21659 maxclustnum=5478, secperfat=92 ERROR: Must have 512 bytes per sector on current (source) drive! [then follows the help screen] The output is the one of a dosemu network drive, this is why the values are so wrong... For a normal drive, you get that sort of output: Drive D: info: maxsecinclust=7 shlclusttosec=3 numressec=1, fats=2, rootdirents=512 firstdatasec=45 maxclustnum=2042, secperfat=6 ERROR: Too few args The "secperfat" value should match the CSAP one, and the sum of numressec + fats * secperfat should match the CSAP start of root directory value. CSAP has special code for DOS 2, 3 and 4..6, so if you set your version number to 1 or > 6, CSAP will bail out. If you set your version number to < 4, you will break CSAP as FreeDOS uses the DOS 4..6 style of the undocumented DPB fields (at least kernel 2026B did). I hope somebody can use this information to shed some light on the problems with CSAP. I recommend that you make CSAP just print the "secperfat" and "rootdirstart" and other values and then exit. If you let it run, it may garble your data due to wrong calculations, if it turns out to calculate the wrong values... CSAP uses FCBS for searching, so please set those in fdconfig.sys or config.sys, whichever you use: FCBS=4,0 VERSION=4.01 (or similar, you get the point, I hope)... Bonus info: After enabling FCBS in my Dosemu box, CSAP seems to work, BUT you must provide a trailing \ if you specify a directory, or you will get "abnormal program termination". However, CSAP often runs into "abnormal program termination" when it tries to recurse. It seems to search for the subdir the wrong way: d:\bar\ d:\foo\ d:\foo\baz\ -> csap -p -r -p d:\bar\ -> it complains about not finding "d:\bar\bar" sometimes, about not finding "d:\bar\foo" the other times (takes turns). Same for trying with d:\foo\ ... Complains on d:\foo\bar\ and d:\foo\foo\ not found in turns. For trying with d:\ ... works if non-recusive, hangs while sorting "d:\bar" in recursion mode. Bar contains a single file, foo several files (one with a long name, plus a deleted one with long name) and foo\baz contains 2 files plus a deleted file. d:\ contains several files. Please investigate further yourself, I do not have the time to do longer investigations myself. Eric