diff options
author | Michael I. Bushnell <mib@gnu.org> | 1994-06-23 16:49:50 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1994-06-23 16:49:50 +0000 |
commit | 7d8cc2eb7ebdaac8e398cb96343d22630241f62d (patch) | |
tree | 0f2dc67ec2b85755cd341bffcf114c0d8f5e6800 /libtrivfs | |
parent | 37986299f351757d102620728f486bc8af7ab4d1 (diff) |
Formerly trivfs.h.~8~
Diffstat (limited to 'libtrivfs')
-rw-r--r-- | libtrivfs/trivfs.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libtrivfs/trivfs.h b/libtrivfs/trivfs.h index 1a75315e..6cec812f 100644 --- a/libtrivfs/trivfs.h +++ b/libtrivfs/trivfs.h @@ -40,6 +40,7 @@ struct trivfs_control struct port_info pi; int protidtypes; mach_port_t underlying; + struct pending_open *openshead, *openstail; }; /* The user must define these variables. */ @@ -61,6 +62,25 @@ extern int trivfs_cntl_nporttypes; nothing. */ void trivfs_modify_stat (struct stat *); +/* If this variable is set, it is called every time an open happens. + UIDS, GIDS, and FLAGS are from the open; CNTL identifies the + node being opened. This call need not check permissions on the underlying + node. If the open call should block, then return EWOULDBLOCK. Other + errors are immediately reflected to the user. If O_NONBLOCK + is not set in FLAGS and EWOULDBLOCK is returned, then call + trivfs_complete_open when all pending open requests for this + file can complete. */ +error_t (*trivfs_check_open_hook) (struct trivfs_control *cntl, + uid_t *uids, u_int nuids, + gid_t *gids, u_int ngids, + int flags); + +/* Call this after *trivfs_check_open_hook returns EWOULDBLOCK when + FLAGS did not include O_NONBLOCK. CNTL identifies the node now + openable. If MULTI is nonzero, then return all pending opens, + otherwise, return only one. */ +void trivfs_complete_open (struct trivfs_control *cntl, int multi); + /* If this variable is set, it is called every time a new protid structure is created and initialized. */ void (*trivfs_protid_create_hook) (struct trivfs_protid *); |