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 /libdiskfs | |
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 'libdiskfs')
-rw-r--r-- | libdiskfs/dir-link.c | 2 | ||||
-rw-r--r-- | libdiskfs/dir-lookup.c | 2 | ||||
-rw-r--r-- | libdiskfs/dir-mkdir.c | 2 | ||||
-rw-r--r-- | libdiskfs/dir-rename.c | 4 | ||||
-rw-r--r-- | libdiskfs/dir-rmdir.c | 2 | ||||
-rw-r--r-- | libdiskfs/dir-unlink.c | 2 | ||||
-rw-r--r-- | libdiskfs/diskfs.h | 2 | ||||
-rw-r--r-- | libdiskfs/file-exec.c | 32 | ||||
-rw-r--r-- | libdiskfs/file-set-trans.c | 6 | ||||
-rw-r--r-- | libdiskfs/fsys-forward.c | 2 | ||||
-rw-r--r-- | libdiskfs/fsys-getfile.c | 6 | ||||
-rw-r--r-- | libdiskfs/fsys-getroot.c | 4 | ||||
-rw-r--r-- | libdiskfs/fsys-options.c | 4 | ||||
-rw-r--r-- | libdiskfs/io-restrict-auth.c | 4 | ||||
-rw-r--r-- | libdiskfs/io-write.c | 2 |
15 files changed, 38 insertions, 38 deletions
diff --git a/libdiskfs/dir-link.c b/libdiskfs/dir-link.c index 2e9cb626..5574fea4 100644 --- a/libdiskfs/dir-link.c +++ b/libdiskfs/dir-link.c @@ -22,7 +22,7 @@ kern_return_t diskfs_S_dir_link (struct protid *dircred, struct protid *filecred, - string_t name, + const_string_t name, int excl) { struct node *np; /* node being linked */ diff --git a/libdiskfs/dir-lookup.c b/libdiskfs/dir-lookup.c index 3534facf..55439b08 100644 --- a/libdiskfs/dir-lookup.c +++ b/libdiskfs/dir-lookup.c @@ -30,7 +30,7 @@ /* Implement dir_lookup as described in <hurd/fs.defs>. */ error_t diskfs_S_dir_lookup (struct protid *dircred, - string_t filename, + const_string_t filename, int flags, mode_t mode, retry_type *do_retry, diff --git a/libdiskfs/dir-mkdir.c b/libdiskfs/dir-mkdir.c index f8c07a55..590d859d 100644 --- a/libdiskfs/dir-mkdir.c +++ b/libdiskfs/dir-mkdir.c @@ -21,7 +21,7 @@ /* Implement dir_mkdir as found in <hurd/fs.defs>. */ kern_return_t diskfs_S_dir_mkdir (struct protid *dircred, - string_t name, + const_string_t name, mode_t mode) { struct node *dnp; diff --git a/libdiskfs/dir-rename.c b/libdiskfs/dir-rename.c index b12dd018..eb123073 100644 --- a/libdiskfs/dir-rename.c +++ b/libdiskfs/dir-rename.c @@ -29,9 +29,9 @@ static pthread_mutex_t renamedirlock = PTHREAD_MUTEX_INITIALIZER; /* Implement dir_rename as described in <hurd/fs.defs>. */ kern_return_t diskfs_S_dir_rename (struct protid *fromcred, - string_t fromname, + const_string_t fromname, struct protid *tocred, - string_t toname, + const_string_t toname, int excl) { struct node *fdp, *tdp, *fnp, *tnp, *tmpnp; diff --git a/libdiskfs/dir-rmdir.c b/libdiskfs/dir-rmdir.c index 8a29979f..7e328c35 100644 --- a/libdiskfs/dir-rmdir.c +++ b/libdiskfs/dir-rmdir.c @@ -22,7 +22,7 @@ /* Implement dir_rmdir as described in <hurd/fs.defs>. */ kern_return_t diskfs_S_dir_rmdir (struct protid *dircred, - char *name) + const_string_t name) { struct node *dnp; struct node *np = NULL; diff --git a/libdiskfs/dir-unlink.c b/libdiskfs/dir-unlink.c index 2a54cc38..5a8bef34 100644 --- a/libdiskfs/dir-unlink.c +++ b/libdiskfs/dir-unlink.c @@ -22,7 +22,7 @@ /* Implement dir_unlink as described in <hurd/fs.defs>. */ kern_return_t diskfs_S_dir_unlink (struct protid *dircred, - string_t name) + const_string_t name) { struct node *dnp; struct node *np; diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h index 2390c64d..a9d1f6bb 100644 --- a/libdiskfs/diskfs.h +++ b/libdiskfs/diskfs.h @@ -1168,7 +1168,7 @@ void diskfs_console_stdio (); typedef struct protid *protid_t; kern_return_t diskfs_S_io_write (protid_t io_object, - data_t data, + const_data_t data, mach_msg_type_number_t dataCnt, loff_t offset, vm_size_t *amount); diff --git a/libdiskfs/file-exec.c b/libdiskfs/file-exec.c index 7625cf43..55b33a14 100644 --- a/libdiskfs/file-exec.c +++ b/libdiskfs/file-exec.c @@ -33,19 +33,19 @@ kern_return_t diskfs_S_file_exec (struct protid *cred, 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 diskfs_S_file_exec_paths (cred, @@ -66,21 +66,21 @@ kern_return_t diskfs_S_file_exec_paths (struct protid *cred, task_t task, int flags, - string_t path, - string_t abspath, - char *argv, + const_string_t path, + const_string_t abspath, + const_data_t argv, size_t argvlen, - char *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) { struct node *np; diff --git a/libdiskfs/file-set-trans.c b/libdiskfs/file-set-trans.c index 4bcb918d..b55967f9 100644 --- a/libdiskfs/file-set-trans.c +++ b/libdiskfs/file-set-trans.c @@ -28,7 +28,7 @@ diskfs_S_file_set_translator (struct protid *cred, int passive_flags, int active_flags, int killtrans_flags, - data_t passive, + const_data_t passive, size_t passivelen, fsys_t active) { @@ -139,7 +139,7 @@ diskfs_S_file_set_translator (struct protid *cred, /* Find the device number from the arguments of the translator. */ int major, minor; - char *arg; + const char *arg; arg = passive + strlen (passive) + 1; assert_backtrace (arg <= passive + passivelen); @@ -185,7 +185,7 @@ diskfs_S_file_set_translator (struct protid *cred, if (newmode == S_IFLNK) { - char *arg = passive + strlen (passive) + 1; + const char *arg = passive + strlen (passive) + 1; assert_backtrace (arg <= passive + passivelen); if (arg == passive + passivelen) { diff --git a/libdiskfs/fsys-forward.c b/libdiskfs/fsys-forward.c index 0b88455c..8d5c2fda 100644 --- a/libdiskfs/fsys-forward.c +++ b/libdiskfs/fsys-forward.c @@ -31,7 +31,7 @@ error_t diskfs_S_fsys_forward (mach_port_t server, mach_port_t reply, mach_msg_type_name_t reply_type, - mach_port_t requestor, data_t argz, size_t argz_len) + mach_port_t requestor, const_data_t argz, size_t argz_len) { return EOPNOTSUPP; } diff --git a/libdiskfs/fsys-getfile.c b/libdiskfs/fsys-getfile.c index fa242c5e..4dadd736 100644 --- a/libdiskfs/fsys-getfile.c +++ b/libdiskfs/fsys-getfile.c @@ -29,9 +29,9 @@ error_t diskfs_S_fsys_getfile (struct diskfs_control *pt, mach_port_t reply, mach_msg_type_name_t reply_type, - uid_t *uids, mach_msg_type_number_t nuids, - gid_t *gids, mach_msg_type_number_t ngids, - data_t handle, mach_msg_type_number_t handle_len, + const uid_t *uids, mach_msg_type_number_t nuids, + const gid_t *gids, mach_msg_type_number_t ngids, + const_data_t handle, mach_msg_type_number_t handle_len, mach_port_t *file, mach_msg_type_name_t *file_type) { int flags; diff --git a/libdiskfs/fsys-getroot.c b/libdiskfs/fsys-getroot.c index 81bd7db4..1bc6c4a3 100644 --- a/libdiskfs/fsys-getroot.c +++ b/libdiskfs/fsys-getroot.c @@ -31,9 +31,9 @@ diskfs_S_fsys_getroot (struct diskfs_control *pt, mach_port_t reply, mach_msg_type_name_t replytype, mach_port_t dotdot, - uid_t *uids, + const uid_t *uids, size_t nuids, - uid_t *gids, + const id_t *gids, size_t ngids, int flags, retry_type *retry, diff --git a/libdiskfs/fsys-options.c b/libdiskfs/fsys-options.c index 8610fe50..ca646a8d 100644 --- a/libdiskfs/fsys-options.c +++ b/libdiskfs/fsys-options.c @@ -28,7 +28,7 @@ struct args { - char *data; + const char *data; mach_msg_type_number_t len; int do_children; }; @@ -50,7 +50,7 @@ kern_return_t diskfs_S_fsys_set_options (struct diskfs_control *pt, mach_port_t reply, mach_msg_type_name_t replytype, - data_t data, mach_msg_type_number_t len, + const_data_t data, mach_msg_type_number_t len, int do_children) { error_t err = 0; diff --git a/libdiskfs/io-restrict-auth.c b/libdiskfs/io-restrict-auth.c index 1c2c999d..4b27a919 100644 --- a/libdiskfs/io-restrict-auth.c +++ b/libdiskfs/io-restrict-auth.c @@ -24,9 +24,9 @@ kern_return_t diskfs_S_io_restrict_auth (struct protid *cred, mach_port_t *newport, mach_msg_type_name_t *newportpoly, - uid_t *uids, + const uid_t *uids, size_t nuids, - gid_t *gids, + const gid_t *gids, size_t ngids) { error_t err; diff --git a/libdiskfs/io-write.c b/libdiskfs/io-write.c index ef5224d6..fa451d8b 100644 --- a/libdiskfs/io-write.c +++ b/libdiskfs/io-write.c @@ -22,7 +22,7 @@ /* Implement io_write as described in <hurd/io.defs>. */ kern_return_t diskfs_S_io_write (struct protid *cred, - data_t data, + const_data_t data, mach_msg_type_number_t datalen, off_t offset, mach_msg_type_number_t *amt) |