qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [PATCH] linux-user: Add RNDGETENTCNT ioctl


From: Laurent Vivier
Subject: Re: [Qemu-trivial] [PATCH] linux-user: Add RNDGETENTCNT ioctl
Date: Thu, 5 Oct 2017 15:38:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 05/10/2017 13:04, Marco A L Barbosa wrote:
> I'm using qemu with this patch (and another one) to run android ndk
> applications.
> 
> Signed-off-by: Marco A L Barbosa <address@hidden>
> ---
>  linux-user/ioctls.h       | 2 ++
>  linux-user/syscall.c      | 1 +
>  linux-user/syscall_defs.h | 4 ++++
>  3 files changed, 7 insertions(+)
> 
> diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
> index e6997ff230..18127288cc 100644
> --- a/linux-user/ioctls.h
> +++ b/linux-user/ioctls.h
> @@ -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)
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 9b6364a266..d4c21a557c 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..2b27786dae 100644
> --- a/linux-user/syscall_defs.h
> +++ b/linux-user/syscall_defs.h
> @@ -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 <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]