mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-10 21:01:49 +00:00
libc/socket_fs: warn on unexpected arg in shutdown
Our 'shutdown' implementation handles only the case that 'how' is 'RDWR'. Thus, print an error and continue if a user calls it with another value. Fixes #2285
This commit is contained in:
parent
1a6963813c
commit
43fcdc43e6
@ -627,6 +627,11 @@ extern "C" int socket_fs_shutdown(int libc_fd, int how)
|
||||
{
|
||||
/* TODO ENOTCONN */
|
||||
|
||||
if (how != SHUT_RDWR) {
|
||||
Genode::error("function '", __func__ , "' only implemented for 'how",
|
||||
"value 'SHUT_RDWR'");
|
||||
}
|
||||
|
||||
Libc::File_descriptor *fd = Libc::file_descriptor_allocator()->find_by_libc_fd(libc_fd);
|
||||
if (!fd)
|
||||
return Errno(EBADF);
|
||||
|
Loading…
x
Reference in New Issue
Block a user