[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 04/41] libfshelp: Port to x86_64
From: |
Sergey Bugaev |
Subject: |
[PATCH 04/41] libfshelp: Port to x86_64 |
Date: |
Tue, 9 May 2023 00:30:59 +0300 |
---
libfshelp/exec-reauth.c | 4 ++--
libfshelp/fshelp.h | 19 ++++++++++++-------
libfshelp/start-translator-long.c | 16 ++++++++++------
libfshelp/start-translator.c | 5 +++--
4 files changed, 27 insertions(+), 17 deletions(-)
diff --git a/libfshelp/exec-reauth.c b/libfshelp/exec-reauth.c
index 7b87d576..6b99175a 100644
--- a/libfshelp/exec-reauth.c
+++ b/libfshelp/exec-reauth.c
@@ -28,8 +28,8 @@
extern error_t
exec_reauth (auth_t auth, int secure, int must_reauth,
- mach_port_t *ports, unsigned num_ports,
- mach_port_t *fds, unsigned num_fds);
+ mach_port_t *ports, mach_msg_type_number_t num_ports,
+ mach_port_t *fds, mach_msg_type_number_t num_fds);
/* If SUID or SGID is true, adds UID and/or GID respectively to the
authentication in PORTS[INIT_PORT_AUTH], and replaces it with the result.
diff --git a/libfshelp/fshelp.h b/libfshelp/fshelp.h
index 8ecfbd57..bb4e5efb 100644
--- a/libfshelp/fshelp.h
+++ b/libfshelp/fshelp.h
@@ -107,13 +107,17 @@ typedef error_t (*fshelp_open_fn_t) (int flags,
task's owner to OWNER_UID (or, if OWNER_UID is -1, then clear the
new task's owner. */
error_t
-fshelp_start_translator_long (fshelp_open_fn_t underlying_open_fn, void
*cookie,
- char *name, char *argz, int argz_len,
+fshelp_start_translator_long (fshelp_open_fn_t underlying_open_fn,
+ void *cookie, char *name, char *argz,
+ mach_msg_type_number_t argz_len,
mach_port_t *fds,
- mach_msg_type_name_t fds_type, int fds_len,
+ mach_msg_type_name_t fds_type,
+ mach_msg_type_number_t fds_len,
mach_port_t *ports,
- mach_msg_type_name_t ports_type, int ports_len,
- int *ints, int ints_len,
+ mach_msg_type_name_t ports_type,
+ mach_msg_type_number_t ports_len,
+ int *ints,
+ mach_msg_type_number_t ints_len,
uid_t owner_uid,
int timeout, fsys_t *control);
@@ -123,8 +127,9 @@ fshelp_start_translator_long (fshelp_open_fn_t
underlying_open_fn, void *cookie,
and the other fds are cleared. */
error_t
fshelp_start_translator (fshelp_open_fn_t underlying_open_fn, void *cookie,
- char *name, char *argz, int argz_len,
- int timeout, fsys_t *control);
+ char *name, char *argz,
+ mach_msg_type_number_t argz_len,
+ int timeout, fsys_t *control);
/* Active translator linkage */
diff --git a/libfshelp/start-translator-long.c
b/libfshelp/start-translator-long.c
index 3541c681..cc95c22c 100644
--- a/libfshelp/start-translator-long.c
+++ b/libfshelp/start-translator-long.c
@@ -192,12 +192,16 @@ service_fsys_startup (fshelp_open_fn_t
underlying_open_fn, void *cookie,
error_t
fshelp_start_translator_long (fshelp_open_fn_t underlying_open_fn,
- void *cookie, char *name, char *argz,
- int argz_len, mach_port_t *fds,
- mach_msg_type_name_t fds_type, int fds_len,
- mach_port_t *ports,
- mach_msg_type_name_t ports_type, int ports_len,
- int *ints, int ints_len,
+ void *cookie, char *name, char *argz,
+ mach_msg_type_number_t argz_len,
+ mach_port_t *fds,
+ mach_msg_type_name_t fds_type,
+ mach_msg_type_number_t fds_len,
+ mach_port_t *ports,
+ mach_msg_type_name_t ports_type,
+ mach_msg_type_number_t ports_len,
+ int *ints,
+ mach_msg_type_number_t ints_len,
uid_t owner_uid,
int timeout, fsys_t *control)
{
diff --git a/libfshelp/start-translator.c b/libfshelp/start-translator.c
index 7f0ae70d..e2716098 100644
--- a/libfshelp/start-translator.c
+++ b/libfshelp/start-translator.c
@@ -25,8 +25,9 @@
error_t
fshelp_start_translator (fshelp_open_fn_t underlying_open_fn,
- void *cookie, char *name, char *argz,
- int argz_len, int timeout, fsys_t *control)
+ void *cookie, char *name, char *argz,
+ mach_msg_type_number_t argz_len,
+ int timeout, fsys_t *control)
{
mach_port_t ports[INIT_PORT_MAX];
mach_port_t fds[STDERR_FILENO + 1];
--
2.40.1
- [PATCH 00/41] The x86_64 port, Sergey Bugaev, 2023/05/08
- [PATCH 02/41] libports: Port to x86_64, Sergey Bugaev, 2023/05/08
- [PATCH 01/41] libshouldbeinlibc: Port to x86_64, Sergey Bugaev, 2023/05/08
- [PATCH 03/41] libiohelp: Port to x86_64, Sergey Bugaev, 2023/05/08
- [PATCH 04/41] libfshelp: Port to x86_64,
Sergey Bugaev <=
- [PATCH 06/41] libtrivfs: Port to x86_64, Sergey Bugaev, 2023/05/08
- [PATCH 09/41] libstore: Port to x86_64, Sergey Bugaev, 2023/05/08
- [PATCH 05/41] libfshelp-tests: Port to x86_64, Sergey Bugaev, 2023/05/08
- [PATCH 07/41] libnetfs: Port to x86_64, Sergey Bugaev, 2023/05/08
- [PATCH 13/41] libmachdev: Port to x86_64, Sergey Bugaev, 2023/05/08
- [PATCH 08/41] libdiskfs: Port to x86_64, Sergey Bugaev, 2023/05/08
- [PATCH 10/41] libpipe: Fix use-after-realloc, Sergey Bugaev, 2023/05/08
- [PATCH 12/41] libps: Silence a warning, Sergey Bugaev, 2023/05/08