diff options
author | Marco A L Barbosa <malbarbo@gmail.com> | 2017-10-05 10:55:30 -0300 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2017-10-16 21:00:04 +0300 |
commit | d6d6d6fe17fa75fb83025ddb02b2c724ba0c1403 (patch) | |
tree | 2fd5a8c77e28a3834a80b8d49578ff070c38f667 | |
parent | f3245d63a0df51184fdf12f483436329ef322d35 (diff) |
linux-user: Add some random ioctls
Signed-off-by: Marco A L Barbosa <malbarbo@gmail.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r-- | linux-user/ioctls.h | 5 | ||||
-rw-r--r-- | linux-user/syscall.c | 1 | ||||
-rw-r--r-- | linux-user/syscall_defs.h | 7 |
3 files changed, 13 insertions, 0 deletions
diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index e6997ff230..35cad6f944 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -173,6 +173,11 @@ IOCTL(SIOCGSTAMP, IOC_R, MK_PTR(MK_STRUCT(STRUCT_timeval))) IOCTL(SIOCGSTAMPNS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_timespec))) + IOCTL(RNDGETENTCNT, IOC_R, MK_PTR(TYPE_INT)) + IOCTL(RNDADDTOENTCNT, IOC_W, MK_PTR(TYPE_INT)) + IOCTL(RNDZAPENTCNT, 0, TYPE_NULL) + IOCTL(RNDCLEARPOOL, 0, TYPE_NULL) + IOCTL(CDROMPAUSE, 0, TYPE_NULL) IOCTL(CDROMSTART, 0, TYPE_NULL) IOCTL(CDROMSTOP, 0, TYPE_NULL) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 3ef4d1c568..9d4cc4cf5d 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -59,6 +59,7 @@ int __clone2(int (*fn)(void *), void *child_stack_base, #include <linux/icmp.h> #include <linux/icmpv6.h> #include <linux/errqueue.h> +#include <linux/random.h> #include "qemu-common.h" #ifdef CONFIG_TIMERFD #include <sys/timerfd.h> diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 40c5027e93..b3d55e35ac 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -1060,6 +1060,13 @@ struct target_pollfd { #define TARGET_SIOCGIWNAME 0x8B01 /* get name == wireless protocol */ +/* From <linux/random.h> */ + +#define TARGET_RNDGETENTCNT TARGET_IOR('R', 0x00, int) +#define TARGET_RNDADDTOENTCNT TARGET_IOW('R', 0x01, int) +#define TARGET_RNDZAPENTCNT TARGET_IO('R', 0x04) +#define TARGET_RNDCLEARPOOL TARGET_IO('R', 0x06) + /* From <linux/fs.h> */ #define TARGET_BLKROSET TARGET_IO(0x12,93) /* set device read-only (0 = read-write) */ |