Distribution: COMPANY CONFIDENTIAL Project: Browser Issue: 0.02 Author(s): Simon Middleton Date: 29-May-96 Last Issue: None
23-05-96 SJM Created 29-05-96 SJM Added allocations and tidied up a bit
None.
The introduction of CacheFS means that it is likely for files to be removed without an applications knowledge. It is possible that the application might need to know about this, however the only notification sent is in the form of an upcall (used by the Filer to keep its displays up to date).
This module allows applications to register interest in particular directory paths and file modification types. The module then keeps a record of any such changes until the application polls it.
Filing systems generate UpCall 3 (PRM page 1-181 to 1-185) when a file is modified. R9 contains a reason code identifying the type of modification with other registers containing extra information.
Note that the UpCall is generated before the operation which may subsequently fail therefore the error should be checked for (using the service call or error vector) to see if the operation succeeded or not. For the initial use of this module we know the operations will never fail so we will ignore this for now. In the future we will have to add a callback handler and check for any errors being generated between the upcall and the callback and if so cancel the change.
SWI chunk base is 0x4d240, error base is 0x80fb00.
The module supports one CLI command.
*FileWatchInfo
This command prints out information on the paths monitored and what file changes are pending on those paths. It is for information only and the format of the returned data should npot be relied upon.
The following SWI calls are implemented.
Set the module to watch a particular set of files for certain types of modification.
Entry: R0 = flags, all reserved R1 -> list of upcall reason codes to watch. The list should be terminated by -1. A null pointer can be given to look for all reason codes. R2 = file prefix Exit: R0 = opaque handle
Remove an interest.
Entry: R0 = flags, all reserved R1 = opaque handle returned from RegisterInterest
Fill in a buffer with file names of files that have changed. Files are written into the buffer null-terminated with no extra padding between file names.
Entry: R0 = flags, all reserved R1 = opaque handle returned from RegisterInterest R2 -> buffer R3 = buffer size Exit: R2 -> first free byte in buffer R3 = bytes left in buffer R4 = number of files left to return
No new data formats defined.
None.
Written in C with veneers by cmhg. Part of the Omega build tree and rommable.