From patchwork Fri Apr 6 16:35:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 151269 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 51FA8B706D for ; Sat, 7 Apr 2012 06:25:19 +1000 (EST) Received: from localhost ([::1]:33444 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGEUb-0007Rl-Jx for incoming@patchwork.ozlabs.org; Fri, 06 Apr 2012 15:06:41 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGCGa-00046y-Bq for qemu-devel@nongnu.org; Fri, 06 Apr 2012 12:44:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SGCGY-0006dG-L4 for qemu-devel@nongnu.org; Fri, 06 Apr 2012 12:44:03 -0400 Received: from afflict.kos.to ([92.243.29.197]:59846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGC89-0004wb-Nw for qemu-devel@nongnu.org; Fri, 06 Apr 2012 12:35:21 -0400 Received: by afflict.kos.to (Postfix, from userid 1000) id AF8DA26536; Fri, 6 Apr 2012 16:35:17 +0000 (UTC) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Fri, 6 Apr 2012 19:35:05 +0300 Message-Id: X-Mailer: git-send-email 1.7.1 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 92.243.29.197 X-Mailman-Approved-At: Fri, 06 Apr 2012 15:05:48 -0400 Cc: Alexander Graf Subject: [Qemu-devel] [PATCH 05/17] linux-user: fix BLK ioctl arguments X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Alexander Graf Some BLK ioctls passed sizeof(x) into a macro that already did sizeof() on the passed in argument, rendering the size information inside the ioctl be the size of the host default integer type. Signed-off-by: Alexander Graf Signed-off-by: Riku Voipio --- linux-user/syscall_defs.h | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index f8f3af3..a79b67d 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -832,9 +832,11 @@ struct target_pollfd { #define TARGET_BLKSECTGET TARGET_IO(0x12,103)/* get max sectors per request (ll_rw_blk.c) */ #define TARGET_BLKSSZGET TARGET_IO(0x12,104)/* get block device sector size */ /* A jump here: 108-111 have been used for various private purposes. */ -#define TARGET_BLKBSZGET TARGET_IOR(0x12,112,sizeof(int)) -#define TARGET_BLKBSZSET TARGET_IOW(0x12,113,sizeof(int)) -#define TARGET_BLKGETSIZE64 TARGET_IOR(0x12,114,sizeof(uint64_t)) /* return device size in bytes (u64 *arg) */ +#define TARGET_BLKBSZGET TARGET_IOR(0x12,112,int) +#define TARGET_BLKBSZSET TARGET_IOW(0x12,113,int) +#define TARGET_BLKGETSIZE64 TARGET_IOR(0x12,114,abi_ulong) + /* return device size in bytes + (u64 *arg) */ #define TARGET_FIBMAP TARGET_IO(0x00,1) /* bmap access */ #define TARGET_FIGETBSZ TARGET_IO(0x00,2) /* get the block size used for bmap */ #define TARGET_FS_IOC_FIEMAP TARGET_IOWR('f',11,struct fiemap)