diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-01-16 18:54:19 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-01-16 19:29:10 +0100 |
commit | dd3048b2e483f66571cfa1b2ccebb2091b9ad990 (patch) | |
tree | e8cc587d06c15befd9ab7212938bb0e05a029c23 /trans | |
parent | 2e38095efd8cad7fe6feb95dbeb276b7a4287f05 (diff) | |
download | hurd-dd3048b2e483f66571cfa1b2ccebb2091b9ad990.tar.gz hurd-dd3048b2e483f66571cfa1b2ccebb2091b9ad990.tar.bz2 hurd-dd3048b2e483f66571cfa1b2ccebb2091b9ad990.zip |
Make RPC input array parameters const
This follows mig's cf4bcc3f1435 ("Also add const qualifiers on server
side")
Diffstat (limited to 'trans')
-rw-r--r-- | trans/bogus-fifo.c | 10 | ||||
-rw-r--r-- | trans/crash.c | 20 | ||||
-rw-r--r-- | trans/fakeroot.c | 34 | ||||
-rw-r--r-- | trans/fifo.c | 2 | ||||
-rw-r--r-- | trans/magic.c | 4 | ||||
-rw-r--r-- | trans/new-fifo.c | 4 | ||||
-rw-r--r-- | trans/null.c | 2 | ||||
-rw-r--r-- | trans/password.c | 4 | ||||
-rw-r--r-- | trans/proxy-defpager.c | 8 | ||||
-rw-r--r-- | trans/random.c | 2 | ||||
-rw-r--r-- | trans/remap.c | 2 | ||||
-rw-r--r-- | trans/streamio.c | 4 | ||||
-rw-r--r-- | trans/symlink.c | 4 |
13 files changed, 50 insertions, 50 deletions
diff --git a/trans/bogus-fifo.c b/trans/bogus-fifo.c index acad6e4b..20941e37 100644 --- a/trans/bogus-fifo.c +++ b/trans/bogus-fifo.c @@ -87,7 +87,7 @@ main (int argc, char **argv) error_t S_fsys_getroot (mach_port_t fsys, mach_port_t parent, - uid_t *uids, unsigned num_uids, gid_t *gids, unsigned num_gids, + const id_t *uids, unsigned num_uids, const id_t *gids, unsigned num_gids, int flags, retry_type *do_retry, char *retry_name, mach_port_t *result, mach_msg_type_name_t *result_type) @@ -123,15 +123,15 @@ S_fsys_syncfs (mach_port_t fsys, int wait, int recurse) error_t S_fsys_set_options (mach_port_t fsys, - char *data, mach_msg_type_number_t data_len, int recurse) + const char *data, mach_msg_type_number_t data_len, int recurse) { return EOPNOTSUPP; } error_t S_fsys_getfile (mach_port_t fsys, - uid_t *uids, unsigned num_uids, gid_t *gids, unsigned num_gids, - char *handle, unsigned handle_len, + const uid_t *uids, unsigned num_uids, const gid_t *gids, unsigned num_gids, + const char *handle, unsigned handle_len, mach_port_t *port, mach_msg_type_name_t *port_type) { return EOPNOTSUPP; @@ -154,7 +154,7 @@ S_fsys_init (mach_port_t fsys, error_t S_fsys_forward (mach_port_t server, mach_port_t requestor, - char *argz, size_t argz_len) + const char *argz, size_t argz_len) { return EOPNOTSUPP; } diff --git a/trans/crash.c b/trans/crash.c index 838ae9b2..6d494ce0 100644 --- a/trans/crash.c +++ b/trans/crash.c @@ -856,9 +856,9 @@ S_msg_add_auth (mach_port_t process, kern_return_t S_msg_del_auth (mach_port_t process, mach_port_t task, - intarray_t uids, + const_intarray_t uids, mach_msg_type_number_t uidsCnt, - intarray_t gids, + const_intarray_t gids, mach_msg_type_number_t gidsCnt) { return EBUSY; } @@ -888,7 +888,7 @@ S_msg_get_init_ports (mach_port_t process, kern_return_t S_msg_set_init_ports (mach_port_t process, mach_port_t refport, - portarray_t ports, + const_portarray_t ports, mach_msg_type_number_t portsCnt) { return EBUSY; } @@ -916,7 +916,7 @@ S_msg_get_init_ints (mach_port_t process, kern_return_t S_msg_set_init_ints (mach_port_t process, mach_port_t refport, - intarray_t values, + const_intarray_t values, mach_msg_type_number_t valuesCnt) { return EBUSY; } @@ -931,7 +931,7 @@ S_msg_get_dtable (mach_port_t process, kern_return_t S_msg_set_dtable (mach_port_t process, mach_port_t refport, - portarray_t dtable, + const_portarray_t dtable, mach_msg_type_number_t dtableCnt) { return EBUSY; } @@ -959,13 +959,13 @@ S_msg_get_environment (mach_port_t process, kern_return_t S_msg_set_environment (mach_port_t process, mach_port_t refport, - data_t value, + const_data_t value, mach_msg_type_number_t valueCnt) { return EBUSY; } kern_return_t S_msg_get_env_variable (mach_port_t process, - string_t variable, + const_string_t variable, data_t *value, mach_msg_type_number_t *valueCnt) { return EBUSY; } @@ -973,8 +973,8 @@ S_msg_get_env_variable (mach_port_t process, kern_return_t S_msg_set_env_variable (mach_port_t process, mach_port_t refport, - string_t variable, - string_t value, + const_string_t variable, + const_string_t value, boolean_t replace) { return EBUSY; } kern_return_t @@ -996,6 +996,6 @@ S_msg_report_wait (mach_port_t process, thread_t thread, { return EBUSY; } error_t S_msg_describe_ports (mach_port_t msgport, mach_port_t refport, - mach_port_t *ports, mach_msg_type_number_t nports, + const mach_port_t *ports, mach_msg_type_number_t nports, data_t *desc, mach_msg_type_number_t *desclen) { return EBUSY; } diff --git a/trans/fakeroot.c b/trans/fakeroot.c index e8825abf..c43a1c00 100644 --- a/trans/fakeroot.c +++ b/trans/fakeroot.c @@ -282,7 +282,7 @@ netfs_check_open_permissions (struct iouser *user, struct node *np, error_t netfs_S_dir_lookup (struct protid *diruser, - string_t filename, + const_string_t filename, int flags, mode_t mode, retry_type *do_retry, @@ -907,21 +907,21 @@ kern_return_t netfs_S_file_exec_paths (struct protid *user, task_t task, int flags, - string_t path, - string_t abspath, - char *argv, + const_string_t path, + const_string_t abspath, + const char *argv, size_t argvlen, - char *envp, + const char *envp, size_t envplen, - mach_port_t *fds, + const mach_port_t *fds, size_t fdslen, - mach_port_t *portarray, + const mach_port_t *portarray, size_t portarraylen, - int *intarray, + const int *intarray, size_t intarraylen, - mach_port_t *deallocnames, + const mach_port_t *deallocnames, size_t deallocnameslen, - mach_port_t *destroynames, + const mach_port_t *destroynames, size_t destroynameslen) { error_t err; @@ -984,19 +984,19 @@ kern_return_t netfs_S_file_exec (struct protid *user, task_t task, int flags, - data_t argv, + const_data_t argv, size_t argvlen, - data_t envp, + const_data_t envp, size_t envplen, - mach_port_t *fds, + const mach_port_t *fds, size_t fdslen, - mach_port_t *portarray, + const mach_port_t *portarray, size_t portarraylen, - int *intarray, + const int *intarray, size_t intarraylen, - mach_port_t *deallocnames, + const mach_port_t *deallocnames, size_t deallocnameslen, - mach_port_t *destroynames, + const mach_port_t *destroynames, size_t destroynameslen) { return netfs_S_file_exec_paths (user, diff --git a/trans/fifo.c b/trans/fifo.c index 326e9a1d..ce7c7729 100644 --- a/trans/fifo.c +++ b/trans/fifo.c @@ -502,7 +502,7 @@ trivfs_S_io_select_timeout (struct trivfs_protid *cred, error_t trivfs_S_io_write (struct trivfs_protid *cred, mach_port_t reply, mach_msg_type_name_t reply_type, - data_t data, size_t data_len, + const_data_t data, size_t data_len, off_t offs, size_t *amount) { error_t err; diff --git a/trans/magic.c b/trans/magic.c index e38efcae..bc23e719 100644 --- a/trans/magic.c +++ b/trans/magic.c @@ -217,7 +217,7 @@ magic_protid_destroy (struct trivfs_protid *cred) error_t trivfs_S_dir_lookup (struct trivfs_protid *cred, mach_port_t reply, mach_msg_type_name_t reply_type, - char *name, + const_string_t name, int flags, mode_t mode, retry_type *retry_type, @@ -525,7 +525,7 @@ trivfs_S_fsys_forward (mach_port_t server, mach_port_t reply, mach_msg_type_name_t replytype, mach_port_t requestor, - char *argz, size_t argz_len) + const char *argz, size_t argz_len) { struct trivfs_protid *cred = ports_lookup_port (all_fsys->pi.bucket, server, trivfs_protid_class); diff --git a/trans/new-fifo.c b/trans/new-fifo.c index f674837f..9a959a39 100644 --- a/trans/new-fifo.c +++ b/trans/new-fifo.c @@ -689,7 +689,7 @@ trivfs_S_io_select_timeout (struct trivfs_protid *cred, error_t trivfs_S_io_write (struct trivfs_protid *cred, mach_port_t reply, mach_msg_type_name_t reply_type, - data_t data, size_t data_len, + const_data_t data, size_t data_len, off_t offs, size_t *amount) { error_t err; @@ -821,7 +821,7 @@ trivfs_S_fsys_forward (mach_port_t server, mach_port_t reply, mach_msg_type_name_t replytype, mach_port_t requestor, - data_t argz, size_t argz_len) + const_data_t argz, size_t argz_len) { error_t err; struct fifo_trans *server_trans, *trans; diff --git a/trans/null.c b/trans/null.c index 5f7660f5..034bb103 100644 --- a/trans/null.c +++ b/trans/null.c @@ -227,7 +227,7 @@ trivfs_S_io_select_timeout (struct trivfs_protid *cred, kern_return_t trivfs_S_io_write (struct trivfs_protid *cred, mach_port_t reply, mach_msg_type_name_t replytype, - data_t data, mach_msg_type_number_t datalen, + const_data_t data, mach_msg_type_number_t datalen, loff_t offs, mach_msg_type_number_t *amt) { if (!cred) diff --git a/trans/password.c b/trans/password.c index 2b16cefd..2777b43d 100644 --- a/trans/password.c +++ b/trans/password.c @@ -141,7 +141,7 @@ trivfs_goaway (struct trivfs_control *fsys, int flags) /* Implement password_check_user as described in <hurd/password.defs>. */ kern_return_t -S_password_check_user (struct trivfs_protid *cred, uid_t user, string_t pw, +S_password_check_user (struct trivfs_protid *cred, uid_t user, const_string_t pw, mach_port_t *port, mach_msg_type_name_t *port_type) { struct ugids ugids = UGIDS_INIT; @@ -189,7 +189,7 @@ S_password_check_user (struct trivfs_protid *cred, uid_t user, string_t pw, /* Implement password_check_group as described in <hurd/password.defs>. */ kern_return_t -S_password_check_group (struct trivfs_protid *cred, uid_t group, string_t pw, +S_password_check_group (struct trivfs_protid *cred, uid_t group, const_string_t pw, mach_port_t *port, mach_msg_type_name_t *port_type) { struct ugids ugids = UGIDS_INIT; diff --git a/trans/proxy-defpager.c b/trans/proxy-defpager.c index 1bb13b7d..8ca25b72 100644 --- a/trans/proxy-defpager.c +++ b/trans/proxy-defpager.c @@ -103,7 +103,7 @@ S_default_pager_object_pages (mach_port_t default_pager, kern_return_t S_default_pager_paging_file (mach_port_t default_pager, mach_port_t master_device_port, - default_pager_filename_t filename, + const_default_pager_filename_t filename, boolean_t add) { return allowed (default_pager, O_WRITE) @@ -114,8 +114,8 @@ S_default_pager_paging_file (mach_port_t default_pager, kern_return_t S_default_pager_paging_storage (mach_port_t default_pager, mach_port_t device, - recnum_t *runs, mach_msg_type_number_t nruns, - default_pager_filename_t name, + const recnum_t *runs, mach_msg_type_number_t nruns, + const_default_pager_filename_t name, boolean_t add) { return allowed (default_pager, O_WRITE) @@ -180,7 +180,7 @@ trivfs_S_io_read (struct trivfs_protid *cred, kern_return_t trivfs_S_io_write (struct trivfs_protid *cred, mach_port_t reply, mach_msg_type_name_t replytype, - data_t data, mach_msg_type_number_t datalen, + const_data_t data, mach_msg_type_number_t datalen, loff_t offs, mach_msg_type_number_t *amt) { if (!cred) diff --git a/trans/random.c b/trans/random.c index e85bf65e..c230280a 100644 --- a/trans/random.c +++ b/trans/random.c @@ -375,7 +375,7 @@ error_t trivfs_S_io_write (struct trivfs_protid *cred, mach_port_t reply, mach_msg_type_name_t replytype, - data_t data, + const_data_t data, mach_msg_type_number_t datalen, loff_t offset, mach_msg_type_number_t *amount) diff --git a/trans/remap.c b/trans/remap.c index fcd276d6..29feef95 100644 --- a/trans/remap.c +++ b/trans/remap.c @@ -56,7 +56,7 @@ static struct remap *remaps; error_t trivfs_S_dir_lookup (struct trivfs_protid *diruser, mach_port_t reply, mach_msg_type_name_t reply_type, - char *filename, + const_string_t filename, int flags, mode_t mode, retry_type *do_retry, diff --git a/trans/streamio.c b/trans/streamio.c index fb449a8a..566f0aa5 100644 --- a/trans/streamio.c +++ b/trans/streamio.c @@ -520,7 +520,7 @@ trivfs_S_io_readable (struct trivfs_protid *cred, error_t trivfs_S_io_write (struct trivfs_protid *cred, mach_port_t reply, mach_msg_type_name_t reply_type, - data_t data, mach_msg_type_number_t data_len, + const_data_t data, mach_msg_type_number_t data_len, loff_t offs, mach_msg_type_number_t *amount) { error_t err; @@ -998,7 +998,7 @@ dev_read (size_t amount, void **buf, size_t *len, int nowait) error_t device_read_reply_inband (mach_port_t reply, error_t errorcode, - io_buf_ptr_inband_t data, u_int datalen) + const io_buf_ptr_inband_t data, u_int datalen) { if (reply != phys_reply) return EOPNOTSUPP; diff --git a/trans/symlink.c b/trans/symlink.c index f7883448..06e962cf 100644 --- a/trans/symlink.c +++ b/trans/symlink.c @@ -125,8 +125,8 @@ main (int argc, char **argv) error_t S_fsys_getroot (mach_port_t fsys_t, mach_port_t dotdotnode, - uid_t *uids, size_t nuids, - uid_t *gids, size_t ngids, + const id_t *uids, size_t nuids, + const id_t *gids, size_t ngids, int flags, retry_type *do_retry, string_t retry_name, |