diff mbox

[v2,15/16] linux-user: support the KDSIGACCEPT ioctl

Message ID 1403391191-18603-16-git-send-email-paul@archlinuxmips.org
State New
Headers show

Commit Message

Paul Burton June 21, 2014, 10:53 p.m. UTC
Add a definition of the KDSIGACCEPT ioctl & allow its use by target
programs.

Signed-off-by: Paul Burton <paul@archlinuxmips.org>
---
Changes in v2:
  - None.
---
 linux-user/ioctls.h       | 1 +
 linux-user/syscall_defs.h | 1 +
 2 files changed, 2 insertions(+)

Comments

Peter Maydell June 21, 2014, 11:13 p.m. UTC | #1
On 21 June 2014 23:53, Paul Burton <paul@archlinuxmips.org> wrote:
> Add a definition of the KDSIGACCEPT ioctl & allow its use by target
> programs.
>
> Signed-off-by: Paul Burton <paul@archlinuxmips.org>
> ---
> Changes in v2:
>   - None.
> ---
>  linux-user/ioctls.h       | 1 +
>  linux-user/syscall_defs.h | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
> index 309fb21..cd21e64 100644
> --- a/linux-user/ioctls.h
> +++ b/linux-user/ioctls.h
> @@ -64,6 +64,7 @@
>       IOCTL(KDSKBLED, 0, TYPE_INT)
>       IOCTL(KDGETLED, 0, TYPE_INT)
>       IOCTL(KDSETLED, 0, TYPE_INT)
> +     IOCTL(KDSIGACCEPT, 0, TYPE_INT)
>
>       IOCTL(BLKROSET, IOC_W, MK_PTR(TYPE_INT))
>       IOCTL(BLKROGET, IOC_R, MK_PTR(TYPE_INT))
> diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
> index a1f1fce..4adfd3a 100644
> --- a/linux-user/syscall_defs.h
> +++ b/linux-user/syscall_defs.h
> @@ -831,6 +831,7 @@ struct target_pollfd {
>  #define TARGET_KDSKBLED        0x4B65  /* set led flags (not lights) */
>  #define TARGET_KDGETLED        0x4B31  /* return current led state */
>  #define TARGET_KDSETLED        0x4B32  /* set led state [lights, not flags] */
> +#define TARGET_KDSIGACCEPT     0x4B4E
>
>  #define TARGET_SIOCATMARK      0x8905

The argument to this ioctl is a signal number, right?
Surely we need to translate it to a host signal number,
not just pass it through as TYPE_INT...

thanks
-- PMM
Paul Burton June 22, 2014, 10:08 a.m. UTC | #2
On Sun, Jun 22, 2014 at 12:13:27AM +0100, Peter Maydell wrote:
> > diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
> > index 309fb21..cd21e64 100644
> > --- a/linux-user/ioctls.h
> > +++ b/linux-user/ioctls.h
> > @@ -64,6 +64,7 @@
> >       IOCTL(KDSKBLED, 0, TYPE_INT)
> >       IOCTL(KDGETLED, 0, TYPE_INT)
> >       IOCTL(KDSETLED, 0, TYPE_INT)
> > +     IOCTL(KDSIGACCEPT, 0, TYPE_INT)
...snip...
> 
> The argument to this ioctl is a signal number, right?
> Surely we need to translate it to a host signal number,
> not just pass it through as TYPE_INT...

True, not sure how I missed that - the clue is in the name!

Thanks,
    Paul
diff mbox

Patch

diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index 309fb21..cd21e64 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -64,6 +64,7 @@ 
      IOCTL(KDSKBLED, 0, TYPE_INT)
      IOCTL(KDGETLED, 0, TYPE_INT)
      IOCTL(KDSETLED, 0, TYPE_INT)
+     IOCTL(KDSIGACCEPT, 0, TYPE_INT)
 
      IOCTL(BLKROSET, IOC_W, MK_PTR(TYPE_INT))
      IOCTL(BLKROGET, IOC_R, MK_PTR(TYPE_INT))
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index a1f1fce..4adfd3a 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -831,6 +831,7 @@  struct target_pollfd {
 #define TARGET_KDSKBLED        0x4B65	/* set led flags (not lights) */
 #define TARGET_KDGETLED        0x4B31	/* return current led state */
 #define TARGET_KDSETLED        0x4B32	/* set led state [lights, not flags] */
+#define TARGET_KDSIGACCEPT     0x4B4E
 
 #define TARGET_SIOCATMARK      0x8905