qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Anthony Liguori <aliguori@us.ibm.com>, Blue Swirl <blauwirbel@gmail.com>
Cc: Riku Voipio <riku.voipio@iki.fi>, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 02/10] linux-user: Fix SNDCTL_DSP_MAP{IN, OUT}BUF ioctl definitions
Date: Tue, 14 Aug 2012 10:40:28 +0100	[thread overview]
Message-ID: <1344937236-611-3-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1344937236-611-1-git-send-email-peter.maydell@linaro.org>

Fix the SNDCTL_DSP_MAP{IN,OUT}BUF ioctl definitions so that they
refer to a suitably defined target struct layout rather than hardcoding
the ioctl number. This fixes complaints from the syscall_init()
consistency check when running an x86_64-to-x86_64 linux-user qemu.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 linux-user/ioctls.h        |    4 ++--
 linux-user/syscall_defs.h  |    4 ++--
 linux-user/syscall_types.h |    3 +++
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index eb96a08..8a47767 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -186,8 +186,8 @@
   IOCTL(SNDCTL_DSP_GETISPACE, IOC_R, MK_PTR(MK_STRUCT(STRUCT_audio_buf_info)))
   IOCTL(SNDCTL_DSP_GETOSPACE, IOC_R, MK_PTR(MK_STRUCT(STRUCT_audio_buf_info)))
   IOCTL(SNDCTL_DSP_GETTRIGGER, IOC_R, MK_PTR(TYPE_INT))
-  IOCTL(SNDCTL_DSP_MAPINBUF, IOC_R, MK_PTR(TYPE_INT))
-  IOCTL(SNDCTL_DSP_MAPOUTBUF, IOC_R, MK_PTR(TYPE_INT))
+  IOCTL(SNDCTL_DSP_MAPINBUF, IOC_R, MK_PTR(MK_STRUCT(STRUCT_buffmem_desc)))
+  IOCTL(SNDCTL_DSP_MAPOUTBUF, IOC_R, MK_PTR(MK_STRUCT(STRUCT_buffmem_desc)))
   IOCTL(SNDCTL_DSP_NONBLOCK, 0, TYPE_NULL)
   IOCTL(SNDCTL_DSP_POST, 0, TYPE_NULL)
   IOCTL(SNDCTL_DSP_RESET, 0, TYPE_NULL)
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 2026579..2cfda5a 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -2226,8 +2226,8 @@ struct target_eabi_flock64 {
 #define TARGET_SNDCTL_DSP_GETTRIGGER      TARGET_IOR('P',16, int)
 #define TARGET_SNDCTL_DSP_GETIPTR         TARGET_IORU('P',17)
 #define TARGET_SNDCTL_DSP_GETOPTR         TARGET_IORU('P',18)
-#define TARGET_SNDCTL_DSP_MAPINBUF        0x80085013
-#define TARGET_SNDCTL_DSP_MAPOUTBUF       0x80085014
+#define TARGET_SNDCTL_DSP_MAPINBUF        TARGET_IORU('P', 19)
+#define TARGET_SNDCTL_DSP_MAPOUTBUF       TARGET_IORU('P', 20)
 #define TARGET_SNDCTL_DSP_NONBLOCK        0x0000500e
 #define TARGET_SNDCTL_DSP_SAMPLESIZE      0xc0045005
 #define TARGET_SNDCTL_DSP_SETDUPLEX       0x00005016
diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h
index 601618d..44b6a58 100644
--- a/linux-user/syscall_types.h
+++ b/linux-user/syscall_types.h
@@ -77,6 +77,9 @@ STRUCT(audio_buf_info,
 STRUCT(count_info,
        TYPE_INT, TYPE_INT, TYPE_INT)
 
+STRUCT(buffmem_desc,
+       TYPE_PTRVOID, TYPE_INT)
+
 STRUCT(mixer_info,
        MK_ARRAY(TYPE_CHAR, 16), MK_ARRAY(TYPE_CHAR, 32), TYPE_INT, MK_ARRAY(TYPE_INT, 10))
 
-- 
1.7.9.5

  parent reply	other threads:[~2012-08-14  9:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-14  9:40 [Qemu-devel] [PULL for-1.2 00/10] linux-user queue Peter Maydell
2012-08-14  9:40 ` [Qemu-devel] [PATCH 01/10] linux-user: Fix incorrect TARGET_BLKBSZGET, TARGET_BLKBSZSET Peter Maydell
2012-08-14  9:40 ` Peter Maydell [this message]
2012-08-14  9:40 ` [Qemu-devel] [PATCH 03/10] linux-user: Move target_to_host_errno_table[] setup out of ioctl loop Peter Maydell
2012-08-14 18:27   ` Blue Swirl
2012-08-14 18:38     ` Peter Maydell
2012-08-14 18:58       ` Blue Swirl
2012-08-14 19:35         ` Peter Maydell
2012-08-14  9:40 ` [Qemu-devel] [PATCH 04/10] linux-user: pass sockaddr from host to target Peter Maydell
2012-08-14  9:40 ` [Qemu-devel] [PATCH 05/10] linux-user: make do_setsockopt support SOL_RAW ICMP_FILTER socket option Peter Maydell
2012-08-14  9:40 ` [Qemu-devel] [PATCH 06/10] linux-user: make host_to_target_cmsg support SO_TIMESTAMP cmsg_type Peter Maydell
2012-08-14  9:40 ` [Qemu-devel] [PATCH 07/10] flatload: fix bss clearing Peter Maydell
2012-08-14  9:40 ` [Qemu-devel] [PATCH 08/10] linux-user: Factor out guest space probing into a function Peter Maydell
2012-08-14  9:40 ` [Qemu-devel] [PATCH 09/10] linux-user: Use init_guest_space when -R and -B are specified Peter Maydell
2012-08-14  9:40 ` [Qemu-devel] [PATCH 10/10] linux-user: ARM: Ignore immediate value for svc in thumb mode Peter Maydell
2012-08-14 19:56 ` [Qemu-devel] [PULL for-1.2 00/10] linux-user queue Blue Swirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1344937236-611-3-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=aliguori@us.ibm.com \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).