Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/tools/include/nolibc/sys/ioctl.h
26295 views
1
/* SPDX-License-Identifier: LGPL-2.1 OR MIT */
2
/*
3
* Ioctl definitions for NOLIBC
4
* Copyright (C) 2017-2021 Willy Tarreau <[email protected]>
5
*/
6
7
/* make sure to include all global symbols */
8
#include "../nolibc.h"
9
10
#ifndef _NOLIBC_SYS_IOCTL_H
11
#define _NOLIBC_SYS_IOCTL_H
12
13
#include "../sys.h"
14
15
#include <linux/ioctl.h>
16
17
/*
18
* int ioctl(int fd, unsigned long cmd, ... arg);
19
*/
20
21
static __attribute__((unused))
22
long sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
23
{
24
return my_syscall3(__NR_ioctl, fd, cmd, arg);
25
}
26
27
#define ioctl(fd, cmd, arg) __sysret(sys_ioctl(fd, cmd, (unsigned long)(arg)))
28
29
#endif /* _NOLIBC_SYS_IOCTL_H */
30
31