summaryrefslogtreecommitdiff
path: root/libfshelp
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-08-08 01:25:50 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-08-08 02:28:06 +0200
commit3bc9a699ca7106204ffa97272374313bf04f6cc0 (patch)
treed4b83df84a6bb65a343f746b1f542df3ac64ae4b /libfshelp
parente22f3a3170e5c3028dc83fbdfb0d8705fd00df75 (diff)
Homogeneize [gs]et_translator and get_dire[nc]ts into mach_msg_type_number_t
This makes netfs_[gs]et_translator use mach_msg_type_number_t like the RPC and diskfs. This also makes the fshelp_fetch_root_callback1_t for fshelp_fetch_root use mach_msg_type_number_t. This also makes procfs_get_translator and the get_translator proc method use mach_msg_type_number_t. This makes diskfs_get_directs use mach_msg_type_number_t like the dir_readdir RPC Also get rid of u_int. This notably fixes _diskfs_translator_callback1_fn's bogus cast of size_t *argz_len into (u_int *).
Diffstat (limited to 'libfshelp')
-rw-r--r--libfshelp/fetch-root.c4
-rw-r--r--libfshelp/fshelp.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/libfshelp/fetch-root.c b/libfshelp/fetch-root.c
index f3ae0ee9..1c099737 100644
--- a/libfshelp/fetch-root.c
+++ b/libfshelp/fetch-root.c
@@ -53,7 +53,7 @@ fshelp_fetch_root (struct transbox *box, void *cookie,
{
uid_t uid, gid;
char *argz;
- size_t argz_len;
+ mach_msg_type_number_t argz_len;
error_t err;
mach_port_t ports[INIT_PORT_MAX];
int ints[INIT_INT_MAX];
@@ -209,7 +209,7 @@ fshelp_fetch_root (struct transbox *box, void *cookie,
error_t
fshelp_short_circuited_callback1 (void *cookie1, void *cookie2,
uid_t *uid, gid_t *gid,
- char **argz, size_t *argz_len)
+ char **argz, mach_msg_type_number_t *argz_len)
{
struct fshelp_stat_cookie2 *statc = cookie2;
diff --git a/libfshelp/fshelp.h b/libfshelp/fshelp.h
index b050ecac..5a5b5bb1 100644
--- a/libfshelp/fshelp.h
+++ b/libfshelp/fshelp.h
@@ -163,7 +163,7 @@ struct transbox
COOKIE2 is the cookie passed in the call to fshelp_fetch_root. */
typedef error_t (*fshelp_fetch_root_callback1_t) (void *cookie1, void *cookie2,
uid_t *uid, gid_t *gid,
- char **argz, size_t *argz_len);
+ char **argz, mach_msg_type_number_t *argz_len);
/* A cookie for fshelp_short_circuited_callback1. Such a structure
must be passed to the call to fshelp_fetch_root. */
@@ -178,7 +178,7 @@ struct fshelp_stat_cookie2
S_IFSOCK must be handled elsewhere. */
error_t fshelp_short_circuited_callback1 (void *cookie1, void *cookie2,
uid_t *uid, gid_t *gid,
- char **argz, size_t *argz_len);
+ char **argz, mach_msg_type_number_t *argz_len);
/* This routine is called by fshelp_fetch_root to fetch more information.