1 /*
2 * Copyright 2024 Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5
6
7 #include <devctl.h>
8 #include <syscalls.h>
9
10
11 int
posix_devctl(int fd,int cmd,void * __restrict argument,size_t size,int * __restrict result)12 posix_devctl(int fd, int cmd, void* __restrict argument, size_t size, int* __restrict result)
13 {
14 int status = _kern_ioctl(fd, cmd, argument, size);
15
16 if (status < B_OK)
17 return status;
18
19 if (result != NULL)
20 *result = status;
21
22 return B_OK;
23 }
24