home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / acorn / tech / 664 < prev    next >
Encoding:
Text File  |  1992-11-17  |  2.6 KB  |  71 lines

  1. Newsgroups: comp.sys.acorn.tech
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!sdd.hp.com!spool.mu.edu!agate!doc.ic.ac.uk!mrccrc!warwick!pavo.csi.cam.ac.uk!jubilex!crj10
  3. From: crj10@phx.cam.ac.uk (Clive Jones)
  4. Subject: Re: Getting 3rd Party Filing Systems To Use Showfree
  5. In-Reply-To: u91pag@ecs.ox.ac.uk (Paul Gilkerson)'s message of 16 Nov 92 21:28:02 GMT
  6. Message-ID: <1992Nov17.170523.23294@infodev.cam.ac.uk>
  7. Telephone-Messages: +44 223 33 4900
  8. Sender: news@infodev.cam.ac.uk (USENET news)
  9. Address: Christ's College, Cambridge CB2 3BU, ENGLAND.
  10. Nntp-Posting-Host: ashton.cl.cam.ac.uk
  11. Organization: 6am Digital Playground
  12. X-Furry-Character: Gerald_Duck
  13. References: <1992Nov16.212802.8912@black.ox.ac.uk>
  14. Date: Tue, 17 Nov 1992 17:05:23 GMT
  15. Lines: 54
  16.  
  17. In article <1992Nov16.212802.8912@black.ox.ac.uk>, u91pag@ecs.ox.ac.uk (Paul Gilkerson) writes:
  18. [ Tried hacking the FreeSpace module to handle his IDEFS ]
  19.  
  20. > What I want to know is if there is anyone out there who knows anything
  21. > about showfree and how it works, or if anyone has solved the same
  22. > problem before.
  23.  
  24. The FreeSpace module knows, initially, how to deal with ADFS, RAMFS, NETFS,
  25. NFS and SCSIFS. Other filing systems have to register by calling:
  26.  
  27. SWI Free_Register
  28.   r0 = Filing system number
  29.   r1 = Address of handler routine
  30.   r2 = r12 on entry to handler routine
  31.  
  32. ...and deregister by calling:
  33.  
  34. SWI Free_DeRegister
  35.   r0 = Filing system number
  36.  
  37. The handler routine is called with:
  38.   r0 = 0      - No-op (just return)
  39.        1      - Get device name
  40.                 r0 <- 1
  41.                 r1 <- FS number
  42.                 r2 <- Buffer for result
  43.                 r3 <- Device name / id
  44.                 r0 -> length of name
  45.                 r1 preserved
  46.                 r2 preserved
  47.                 r3 preserved
  48.        2      - Get free space for device
  49.                 r0 <- 2
  50.                 r1 <- FS number
  51.                 r2 <- Buffer
  52.                 r3 <- Device name / id
  53.                 r0-r3 preserved, or r2=0 for free space not changed
  54.                 [r2] should be set to total device size
  55.                 [r2,4]  "  "  free space
  56.                 [r2,8]  "  "  used space
  57.        3      - Compare device
  58.                 r0 <- 3
  59.                 r1 <- FS number
  60.                 r2 <- filename
  61.                 r3 <- Device id
  62.                 r6 <- Special field
  63.                 r0-3,r6 preserved
  64.                 Z is set on exit if r2,r6 indicate a file on device r3, clear
  65.                 otherwise.
  66.  
  67. Now - whether or not you can use that to build a free-space monitor for your
  68. IDEFS is a different matter, of course. (-8
  69.  
  70. --Clive.
  71.