IFSMgr_CheckAccessConflict(
int fSoftCompatibleDisable,
fmode_t pfmode,
int (*pfn)( fmode_t *, const void *),
const void * FSDCookie
)
This service validates the desired access and sharing mode and determines if it can be granted. The FSD is expected to maintain an open file table and a list of processes currently sharing the file. An enumeration function is passed in as part of the parameters. The FSD's enumeration function is called to enumerate the various instances of the open file. The IFS manager then checks the sharing and access modes for each open instance of the file to see if the desired access and sharing mode can be permitted.
Fmode_t Structure: | |
fm_uid | This field provides the user ID for the process. |
fm_cookie0 | This is a field that the caller can store anything into. For example, this could be a pointer to an open file table structure. |
fm_cookie1 | This is also a field that the caller can store anything into. For example, this could be the pointer to a particular instance of the open file. |
fm_mode | This field provides the desired sharing and access mode. |
fm_attr | This field provides the attributes of the open file. |
EnumerateOpenFileInstance(
fmode_t pfname,
const void * FSDCookie
)
The enumeration function described above is called with a pointer to a fmode_t structure that is to be filled in and the FSDCookie parameter that was supplied by the caller. This parameter should contain enough information for the FSD to traverse its list of instances for an open file one by one. For each open instance, the function fills in the fields in the fmode_t structure that was passed in and returns to the IFS manager. The parameters for the enumeration function are described below.