* [Qemu-trivial] [PATCH] linux-user: Add some random ioctls
@ 2017-10-05 13:55 Marco A L Barbosa
2017-10-06 7:32 ` Laurent Vivier
0 siblings, 1 reply; 4+ messages in thread
From: Marco A L Barbosa @ 2017-10-05 13:55 UTC (permalink / raw)
To: qemu-trivial
Signed-off-by: Marco A L Barbosa <malbarbo@gmail.com>
---
linux-user/ioctls.h | 5 +++++
linux-user/syscall.c | 1 +
linux-user/syscall_defs.h | 7 +++++++
3 files changed, 13 insertions(+)
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 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..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) */
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [Qemu-trivial] [PATCH] linux-user: Add some random ioctls
2017-10-05 13:55 [Qemu-trivial] [PATCH] linux-user: Add some random ioctls Marco A L Barbosa
@ 2017-10-06 7:32 ` Laurent Vivier
2017-10-06 21:35 ` Marco A L Barbosa
0 siblings, 1 reply; 4+ messages in thread
From: Laurent Vivier @ 2017-10-06 7:32 UTC (permalink / raw)
To: Marco A L Barbosa, qemu-trivial
On 05/10/2017 15:55, Marco A L Barbosa wrote:
> Signed-off-by: Marco A L Barbosa <malbarbo@gmail.com>
> ---
> linux-user/ioctls.h | 5 +++++
> linux-user/syscall.c | 1 +
> linux-user/syscall_defs.h | 7 +++++++
> 3 files changed, 13 insertions(+)
>
> 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 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..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) */
>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Please, add a tag version and include history when you resend a series.
Read https://wiki.qemu.org/Contribute/SubmitAPatch
Thanks,
Laurent
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [Qemu-trivial] [PATCH] linux-user: Add some random ioctls
2017-10-06 7:32 ` Laurent Vivier
@ 2017-10-06 21:35 ` Marco A L Barbosa
2017-10-09 6:31 ` Laurent Vivier
0 siblings, 1 reply; 4+ messages in thread
From: Marco A L Barbosa @ 2017-10-06 21:35 UTC (permalink / raw)
To: Laurent Vivier; +Cc: qemu-trivial
[-- Attachment #1: Type: text/plain, Size: 2580 bytes --]
Thanks again for the advice.
This and the other patch should be resubmitted following those instructions
or it is not necessary?
On Fri, Oct 6, 2017 at 4:32 AM, Laurent Vivier <lvivier@redhat.com> wrote:
> On 05/10/2017 15:55, Marco A L Barbosa wrote:
> > Signed-off-by: Marco A L Barbosa <malbarbo@gmail.com>
> > ---
> > linux-user/ioctls.h | 5 +++++
> > linux-user/syscall.c | 1 +
> > linux-user/syscall_defs.h | 7 +++++++
> > 3 files changed, 13 insertions(+)
> >
> > 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 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..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) */
> >
>
> Reviewed-by: Laurent Vivier <lvivier@redhat.com>
>
> Please, add a tag version and include history when you resend a series.
>
> Read https://wiki.qemu.org/Contribute/SubmitAPatch
>
> Thanks,
> Laurent
>
--
Marco A L Barbosa
http://malbarbo.pro.br
--
[-- Attachment #2: Type: text/html, Size: 3766 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-09 6:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-05 13:55 [Qemu-trivial] [PATCH] linux-user: Add some random ioctls Marco A L Barbosa
2017-10-06 7:32 ` Laurent Vivier
2017-10-06 21:35 ` Marco A L Barbosa
2017-10-09 6:31 ` Laurent Vivier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).