Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!comp.vuw.ac.nz!jwright From: Julian.Wright@comp.vuw.ac.nz (John Julian Wright) Newsgroups: comp.sys.acorn Subject: Re: Free space Keywords: free space Message-ID: <1991Mar24.234322.2570@comp.vuw.ac.nz> Date: 24 Mar 91 23:43:22 GMT References: <7151@ecs.soton.ac.uk> <1991Mar18.231818.10508@comp.vuw.ac.nz> <7284@ecs.soton.ac.uk> Sender: news@comp.vuw.ac.nz (News Admin) Reply-To: jwright@comp.vuw.ac.nz (John Julian Wright) Organization: Dept. of Comp. Sci., Victoria Uni. of Wellington, New Zealand. Lines: 42 Nntp-Posting-Host: depot.comp.vuw.ac.nz Originator: jwright@depot.comp.vuw.ac.nz In article <7284@ecs.soton.ac.uk>, snb90@ecs.soton.ac.uk (Brodie SN) writes: |> Make a text file for the application containing all the SWI prefixs |> known at time of writing. The user can update the list when new filing |> systems are brought out. Ouch! Call me paranoid but if there is one thing I don't want to get the end user to get involved in it's a list of SWI prefixes... |> However, the clever bit is then using the OS_ConvertSWINumberFromName or |> whatever it is with FSPrefix_0 as the name. If this call succeeds, you know |> that that particular FS is present, and can do processing on it! This can only verify that the SWI prefix list contains valid entries... there is nothing the program can do if one of them turns out to be invalid. An alternative is to: 1) Scan for new filing systems by number 2) Convert the filing system number into it's name, when one is found. 3) Scan all modules for a title which contains the filing system name. Hopefully there will be only one (fat chance! - look at econet...) 4) For all modules found, rummage around until you find their SWI table 5) Convert all SWIs found this way into strings. 6) Search the strings for "FreeSpace" but even this fails to provide a way of returning the free space from a path variable, which is how we are supposed to refer to all filing systems anyway. I suppose I could eliminate the first three steps in the above and just scan ALL current modules for SWIs containing "FreeSpace", but this sort of thing takes time... and you get problems when using "temporary" filing systems like RAMFS which might not have been around when you scanned the modules but has been added later. Cheers, Julian -- ;`````````````````````````````````````````````````````````````````````````````; ; I would if I could but I can't so I won't but I might if I find I can later ; ;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,; jwright@comp.vuw.ac.nz julian@sideways.gen.ac.nz