linux-user: Add RNDGETENTCNT ioctl
PATCH 1/1 linux-user: Add RNDGETENTCNT ioctl
I'm using qemu with this patch (and another one) to run android ndk applications.
Signed-off-by Marco A L Barbosa <[email protected]>
--- linux-user/ioctls.h | 2 ++ linux-user/syscall.c | 1 + linux-user/syscall_defs.h | 4 ++++ 3 files changed, 7 insertions(+)
linux-user/ioctls.h +2 -0
@@ -173,6 +173,8 @@ 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(CDROMPAUSE, 0, TYPE_NULL) IOCTL(CDROMSTART, 0, TYPE_NULL)IOCTL (CDROMSTOP ,0 ,TYPE_NULL )
linux-user/syscall.c +1 -0
@@ -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>
linux-user/syscall_defs.h +4 -0
@@ -1060,6 +1060,10 @@ struct target_pollfd {#define TARGET_SIOCGIWNAME 0x8B01/* get name == wireless protocol */ +/* From <linux/random.h> */ + +#define TARGET_RNDGETENTCNT TARGET_IOR('R', 0x00, int) +/* From <linux/fs.h> */ #define TARGET_BLKROSET TARGET_IO(0x12,93)/* set device read-only (0 = read-write) */
Signature · 1 line
2.11.0
Quoted 41 lines · Marco A L Barbosa
I'm using qemu with this patch (and another one) to run android ndk applications.
Signed-off-by Marco A L Barbosa <[email protected]>--- linux-user/ioctls.h | 2 ++ linux-user/syscall.c | 1 + linux-user/syscall_defs.h | 4 ++++ 3 files changed, 7 insertions(+)linux-user/ioctls.h +2
-0@@ -173,6 +173,8 @@ 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(CDROMPAUSE, 0, TYPE_NULL) IOCTL(CDROMSTART, 0, TYPE_NULL)IOCTL (CDROMSTOP ,0 ,TYPE_NULL )linux-user/syscall.c +1
-0@@ -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> linux-user/syscall_defs.h +0
-0
linux-user/syscall_defs.h struct target_pollfd { · line 1069
Quoted 10 lines
linux-user/syscall_defs.h +4
-0@@ -1060,6 +1060,10 @@ struct target_pollfd {#define TARGET_SIOCGIWNAME 0x8B01/* get name == wireless protocol */ +/* From <linux/random.h> */ + +#define TARGET_RNDGETENTCNT TARGET_IOR('R', 0x00, int) +/* From <linux/fs.h> */ #define TARGET_BLKROSET TARGET_IO(0x12,93)/* set device read-only (0 = read-write) */
It would be better to keep RNDADDTOENTCNT, RNDZAPENTCNT and RNDCLEARPOOL as the changes are trivial too.
Anyway:
Reviewed-by Laurent Vivier <[email protected]>
Ok, I sent another patch. Thanks.
Quoted 63 lines · Laurent Vivier
Quoted 40 lines · Marco A L Barbosa
I'm using qemu with this patch (and another one) to run android ndk applications.
Signed-off-by Marco A L Barbosa <[email protected]>--- linux-user/ioctls.h | 2 ++ linux-user/syscall.c | 1 + linux-user/syscall_defs.h | 4 ++++ 3 files changed, 7 insertions(+)linux-user/ioctls.h +2
-0@@ -173,6 +173,8 @@ 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(CDROMPAUSE, 0, TYPE_NULL) IOCTL(CDROMSTART, 0, TYPE_NULL)IOCTL (CDROMSTOP ,0 ,TYPE_NULL )linux-user/syscall.c +1
-0@@ -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> linux-user/syscall_defs.h +0
-0linux-user/syscall_defs.h struct target_pollfd { · line 1061
Quoted 2 lines
linux-user/syscall_defs.h +0
-0@@ -1060,6 +1060,10 @@ struct target_pollfd {#define TARGET_SIOCGIWNAME 0x8B01/* get name == wireless protocol */
linux-user/syscall_defs.h struct target_pollfd {
Quoted 8 lines
linux-user/syscall_defs.h +4
-0+/* From <linux/random.h> */ + +#define TARGET_RNDGETENTCNT TARGET_IOR('R', 0x00, int) +/* From <linux/fs.h> */ #define TARGET_BLKROSET TARGET_IO(0x12,93)/* set device read-only (0 = read-write) */
Quoted 1 line
It would be better to keep RNDADDTOENTCNT, RNDZAPENTCNT and RNDCLEARPOOL as the changes are trivial too.
Anyway:
Reviewed-by Laurent Vivier <[email protected]>
Signature · 3 lines
Marco A L Barbosa http://malbarbo.pro.br --