diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2023-04-08 01:03:31 -0400 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-04-08 10:55:59 +0200 |
commit | a096270c77b1f6461a2ef58660ad9cfa9cbb32bb (patch) | |
tree | b9c713ad70ae6705a1dfe6d76c35c0d918515d2e /libtrivfs/trivfs.h | |
parent | 5de1b81f0bb24ba38d0a819bba9bd526863b5385 (diff) | |
download | hurd-a096270c77b1f6461a2ef58660ad9cfa9cbb32bb.tar.gz hurd-a096270c77b1f6461a2ef58660ad9cfa9cbb32bb.tar.bz2 hurd-a096270c77b1f6461a2ef58660ad9cfa9cbb32bb.zip |
Further modernize Hurd code by enforcing strict prototypes and no implicit function declarations.
Most of the changes land in one of these buckets:
* Removed unused declarations.
* Used (void) to represent no parameters instead of () which means an
undeterminate number of parameters.
* Included missing header files whenever necessary (stdlib.h,
sys/mman.h, etc)
* Typedefed function pointers to be able to fully declare the parameter
types.
* Added declarations of library functions that are used elsewhere
(example is libps/ps.h).
* Made functions static whenever they are only used in that file.
* Forwarded declarations of some methods that were made static.
Message-Id: <ZDD1o7/tVYeZew+G@jupiter.tail36e24.ts.net>
Diffstat (limited to 'libtrivfs/trivfs.h')
-rw-r--r-- | libtrivfs/trivfs.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libtrivfs/trivfs.h b/libtrivfs/trivfs.h index 4802f5fc..25b601ff 100644 --- a/libtrivfs/trivfs.h +++ b/libtrivfs/trivfs.h @@ -146,11 +146,7 @@ extern void (*trivfs_protid_destroy_hook) (struct trivfs_protid *); is about to be destroyed. */ extern void (*trivfs_peropen_destroy_hook) (struct trivfs_peropen *); -/* If this variable is set, it is called by trivfs_S_fsys_getroot before any - other processing takes place; if the return value is EAGAIN, normal trivfs - getroot processing continues, otherwise the rpc returns with that return - value. */ -extern error_t (*trivfs_getroot_hook) (struct trivfs_control *cntl, +typedef error_t (*trivfs_getroot_hook_fun) (struct trivfs_control *cntl, mach_port_t reply_port, mach_msg_type_name_t reply_port_type, mach_port_t dotdot, @@ -159,6 +155,12 @@ extern error_t (*trivfs_getroot_hook) (struct trivfs_control *cntl, retry_type *do_retry, char *retry_name, mach_port_t *node, mach_msg_type_name_t *node_type); +/* If this variable is set, it is called by trivfs_S_fsys_getroot before any + other processing takes place; if the return value is EAGAIN, normal trivfs + getroot processing continues, otherwise the rpc returns with that return + value. */ +extern trivfs_getroot_hook_fun trivfs_getroot_hook; + /* Creates a control port for this filesystem and sends it to BOOTSTRAP with fsys_startup. CONTROL_CLASS & CONTROL_BUCKET are passed to the ports library to create the control port, and PROTID_CLASS & PROTID_BUCKET are |