diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2023-12-14 01:06:37 -0500 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-12-17 23:57:00 +0100 |
commit | 6b494f5e7599ece2ca981472d690db3df3133bde (patch) | |
tree | 82ea19a196c6e4c8c53ddce4d1528e92b9751cb1 /pflocal | |
parent | b1d240be9b36a1db738e1357081987873be94636 (diff) | |
download | hurd-6b494f5e7599ece2ca981472d690db3df3133bde.tar.gz hurd-6b494f5e7599ece2ca981472d690db3df3133bde.tar.bz2 hurd-6b494f5e7599ece2ca981472d690db3df3133bde.zip |
Update server handlers to return kern_return_error to fix -Werror=enum-int-mismatch warnings
MiG expects those to return kern_return_t.
Message-ID: <ZXqbbXpVqQAwd2qv@jupiter.tail36e24.ts.net>
Diffstat (limited to 'pflocal')
-rw-r--r-- | pflocal/fs.c | 2 | ||||
-rw-r--r-- | pflocal/io.c | 32 | ||||
-rw-r--r-- | pflocal/pf.c | 8 | ||||
-rw-r--r-- | pflocal/socket.c | 24 |
4 files changed, 33 insertions, 33 deletions
diff --git a/pflocal/fs.c b/pflocal/fs.c index 10ed9156..17f5ab4d 100644 --- a/pflocal/fs.c +++ b/pflocal/fs.c @@ -25,7 +25,7 @@ #include "fs_S.h" -error_t +kern_return_t S_file_check_access (struct sock_user *cred, int *type) { if (!cred) diff --git a/pflocal/io.c b/pflocal/io.c index f621bbb3..6d43b6dd 100644 --- a/pflocal/io.c +++ b/pflocal/io.c @@ -41,7 +41,7 @@ /* Read data from an IO object. If offset if -1, read from the object maintained file pointer. If the object is not seekable, offset is ignored. The amount desired to be read is in amount. */ -error_t +kern_return_t S_io_read (struct sock_user *user, data_t *data, mach_msg_type_number_t *data_len, off_t offset, vm_size_t amount) @@ -79,7 +79,7 @@ S_io_read (struct sock_user *user, object at a time; servers implement congestion control by delaying responses to io_write. Servers may drop data (returning ENOBUFS) if they recevie more than one write when not prepared for it. */ -error_t +kern_return_t S_io_write (struct sock_user *user, const_data_t data, mach_msg_type_number_t data_len, off_t offset, vm_size_t *amount) @@ -120,7 +120,7 @@ S_io_write (struct sock_user *user, /* Tell how much data can be read from the object without blocking for a "long time" (this should be the same meaning of "long time" used by the nonblocking flag. */ -error_t +kern_return_t S_io_readable (struct sock_user *user, vm_size_t *amount) { error_t err; @@ -146,7 +146,7 @@ S_io_readable (struct sock_user *user, vm_size_t *amount) } /* Change current read/write offset */ -error_t +kern_return_t S_io_seek (struct sock_user *user, off_t offset, int whence, off_t *new_offset) { @@ -154,7 +154,7 @@ S_io_seek (struct sock_user *user, } /* Return a new port with the same semantics as the existing port. */ -error_t +kern_return_t S_io_duplicate (struct sock_user *user, mach_port_t *new_port, mach_msg_type_name_t *new_port_type) { @@ -282,7 +282,7 @@ io_select_common (struct sock_user *user, return err; } -error_t +kern_return_t S_io_select (struct sock_user *user, mach_port_t reply, mach_msg_type_name_t reply_type, int *select_type) @@ -290,7 +290,7 @@ S_io_select (struct sock_user *user, return io_select_common (user, reply, reply_type, NULL, select_type); } -error_t +kern_return_t S_io_select_timeout (struct sock_user *user, mach_port_t reply, mach_msg_type_name_t reply_type, struct timespec ts, @@ -310,7 +310,7 @@ copy_time (time_value_t *from, time_t *to_sec, long *to_nsec) io_statuf_t are meaningful for all objects; however, the access and modify times, the optimal IO size, and the fs type are meaningful for all objects. */ -error_t +kern_return_t S_io_stat (struct sock_user *user, struct stat *st) { struct sock *sock; @@ -365,7 +365,7 @@ S_io_stat (struct sock_user *user, struct stat *st) return 0; } -error_t +kern_return_t S_io_get_openmodes (struct sock_user *user, int *bits) { unsigned flags; @@ -380,7 +380,7 @@ S_io_get_openmodes (struct sock_user *user, int *bits) return 0; } -error_t +kern_return_t S_io_set_all_openmodes (struct sock_user *user, int bits) { if (!user) @@ -396,7 +396,7 @@ S_io_set_all_openmodes (struct sock_user *user, int bits) return 0; } -error_t +kern_return_t S_io_set_some_openmodes (struct sock_user *user, int bits) { if (!user) @@ -410,7 +410,7 @@ S_io_set_some_openmodes (struct sock_user *user, int bits) return 0; } -error_t +kern_return_t S_io_clear_some_openmodes (struct sock_user *user, int bits) { if (!user) @@ -426,7 +426,7 @@ S_io_clear_some_openmodes (struct sock_user *user, int bits) #define NIDS 10 -error_t +kern_return_t S_io_reauthenticate (struct sock_user *user, mach_port_t rendezvous) { error_t err; @@ -477,7 +477,7 @@ S_io_reauthenticate (struct sock_user *user, mach_port_t rendezvous) return err; } -error_t +kern_return_t S_io_restrict_auth (struct sock_user *user, mach_port_t *new_port, mach_msg_type_name_t *new_port_type, @@ -490,7 +490,7 @@ S_io_restrict_auth (struct sock_user *user, return sock_create_port (user->sock, new_port); } -error_t +kern_return_t S_io_pathconf (struct sock_user *user, int name, int *value) { if (user == NULL) @@ -509,7 +509,7 @@ S_io_pathconf (struct sock_user *user, int name, int *value) return EINVAL; } -error_t +kern_return_t S_io_identity (struct sock_user *user, mach_port_t *id, mach_msg_type_name_t *id_type, mach_port_t *fsys_id, mach_msg_type_name_t *fsys_id_type, diff --git a/pflocal/pf.c b/pflocal/pf.c index 482f3b93..457ebfbd 100644 --- a/pflocal/pf.c +++ b/pflocal/pf.c @@ -29,7 +29,7 @@ /* Create a new socket. Sock type is, for example, SOCK_STREAM, SOCK_DGRAM, or some such. */ -error_t +kern_return_t S_socket_create (trivfs_protid_t pf, int sock_type, int protocol, mach_port_t *port, mach_msg_type_name_t *port_type) @@ -90,7 +90,7 @@ S_socket_create (trivfs_protid_t pf, return err; } -error_t +kern_return_t S_socket_create_address (mach_port_t pf, int sockaddr_type, const_data_t data, mach_msg_type_number_t data_len, @@ -100,7 +100,7 @@ S_socket_create_address (mach_port_t pf, int sockaddr_type, return EOPNOTSUPP; } -error_t +kern_return_t S_socket_fabricate_address (mach_port_t pf, int sockaddr_type, mach_port_t *addr_port, @@ -128,7 +128,7 @@ S_socket_fabricate_address (mach_port_t pf, the file name. This is primarily for the implementation of accept and recvfrom. The functions getsockname and getpeername remain unsupported for the local namespace. */ -error_t +kern_return_t S_socket_whatis_address (struct addr *addr, int *sockaddr_type, data_t *sockaddr, diff --git a/pflocal/socket.c b/pflocal/socket.c index 0e0f8d78..ef54b65b 100644 --- a/pflocal/socket.c +++ b/pflocal/socket.c @@ -28,7 +28,7 @@ #include "socket_S.h" /* Connect two sockets */ -error_t +kern_return_t S_socket_connect2 (struct sock_user *user1, struct sock_user *user2) { error_t err; @@ -61,7 +61,7 @@ ensure_connq (struct sock *sock) } /* Prepare a socket of appropriate type for future accept operations. */ -error_t +kern_return_t S_socket_listen (struct sock_user *user, int queue_limit) { error_t err; @@ -75,7 +75,7 @@ S_socket_listen (struct sock_user *user, int queue_limit) return err; } -error_t +kern_return_t S_socket_connect (struct sock_user *user, struct addr *addr) { error_t err; @@ -171,7 +171,7 @@ S_socket_connect (struct sock_user *user, struct addr *addr) } /* Return a new connection from a socket previously listened. */ -error_t +kern_return_t S_socket_accept (struct sock_user *user, mach_port_t *port, mach_msg_type_name_t *port_type, mach_port_t *peer_addr_port, @@ -222,7 +222,7 @@ S_socket_accept (struct sock_user *user, } /* Bind a socket to an address. */ -error_t +kern_return_t S_socket_bind (struct sock_user *user, struct addr *addr) { if (! addr) @@ -239,7 +239,7 @@ S_socket_bind (struct sock_user *user, struct addr *addr) } /* Shutdown a socket for reading or writing. */ -error_t +kern_return_t S_socket_shutdown (struct sock_user *user, int what) { if (! user) @@ -251,7 +251,7 @@ S_socket_shutdown (struct sock_user *user, int what) } /* Find out the name of a socket. */ -error_t +kern_return_t S_socket_name (struct sock_user *user, mach_port_t *addr_port, mach_msg_type_name_t *addr_port_type) { @@ -273,7 +273,7 @@ S_socket_name (struct sock_user *user, } /* Find out the name of the socket's peer. */ -error_t +kern_return_t S_socket_peername (struct sock_user *user, mach_port_t *addr_port, mach_msg_type_name_t *addr_port_type) @@ -285,7 +285,7 @@ S_socket_peername (struct sock_user *user, } /* Send data over a socket, possibly including Mach ports. */ -error_t +kern_return_t S_socket_send (struct sock_user *user, struct addr *dest_addr, int flags, const_data_t data, mach_msg_type_number_t data_len, const mach_port_t *ports, mach_msg_type_number_t num_ports, @@ -374,7 +374,7 @@ S_socket_send (struct sock_user *user, struct addr *dest_addr, int flags, } /* Receive data from a socket, possibly including Mach ports. */ -error_t +kern_return_t S_socket_recv (struct sock_user *user, mach_port_t *addr, mach_msg_type_name_t *addr_type, int in_flags, @@ -448,7 +448,7 @@ S_socket_recv (struct sock_user *user, return err; } -error_t +kern_return_t S_socket_getopt (struct sock_user *user, int level, int opt, data_t *value, @@ -539,7 +539,7 @@ S_socket_getopt (struct sock_user *user, return ret; } -error_t +kern_return_t S_socket_setopt (struct sock_user *user, int level, int opt, const_data_t value, mach_msg_type_name_t value_len) |