diff options
| author | Kacper <kacper@mail.openlinux.dev> | 2025-12-16 17:02:05 +0100 |
|---|---|---|
| committer | Kacper <kacper@mail.openlinux.dev> | 2025-12-16 17:02:05 +0100 |
| commit | 90dad97fc07f049383903a166631e2c257f9b8c1 (patch) | |
| tree | 096cd247ecfda9e46598215a4f32aecedeedda90 /lib/libc/devctl/posix_devctl.c | |
| parent | 0e832a9329cc4d4647e1ce529846073f21e66991 (diff) | |
Add support for TLS in the libc
Diffstat (limited to 'lib/libc/devctl/posix_devctl.c')
| -rw-r--r-- | lib/libc/devctl/posix_devctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/devctl/posix_devctl.c b/lib/libc/devctl/posix_devctl.c index 59497833..01af3111 100644 --- a/lib/libc/devctl/posix_devctl.c +++ b/lib/libc/devctl/posix_devctl.c @@ -1,13 +1,13 @@ #include <devctl.h> +#include <errno.h> #include <sys/cdefs.h> #include <syscall.h> int posix_devctl(int fildes, int dcmd, void *restrict dev_data_ptr, size_t __unused nbyte, int *restrict dev_info_ptr) { - int r; + int r = syscall(ioctl, fildes, dcmd, dev_data_ptr); - r = syscall(ioctl, fildes, dcmd, dev_data_ptr); - if (r < 0) + if (__predict_false(r < 0)) return errno; *dev_info_ptr = r; |
