From patchwork Sun Aug 28 20:43:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 111940 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F171FB6F83 for ; Mon, 29 Aug 2011 06:43:49 +1000 (EST) Received: from localhost ([::1]:35586 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QxmCj-0002xp-J0 for incoming@patchwork.ozlabs.org; Sun, 28 Aug 2011 16:43:41 -0400 Received: from eggs.gnu.org ([140.186.70.92]:56441) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QxmCX-0002we-BC for qemu-devel@nongnu.org; Sun, 28 Aug 2011 16:43:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QxmCW-00024i-FI for qemu-devel@nongnu.org; Sun, 28 Aug 2011 16:43:29 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:37969) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QxmCW-00024J-8u for qemu-devel@nongnu.org; Sun, 28 Aug 2011 16:43:28 -0400 Received: from localhost (v220110690675601.yourvserver.net.local [127.0.0.1]) by v220110690675601.yourvserver.net (Postfix) with ESMTP id 749DC7283051; Sun, 28 Aug 2011 22:43:27 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at weilnetz.de Received: from v220110690675601.yourvserver.net ([127.0.0.1]) by localhost (v220110690675601.yourvserver.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xxjh0YQg-A7d; Sun, 28 Aug 2011 22:43:27 +0200 (CEST) Received: from flocke.weilnetz.de (p54ADA446.dip.t-dialin.net [84.173.164.70]) by v220110690675601.yourvserver.net (Postfix) with ESMTPSA id 1652C728304A; Sun, 28 Aug 2011 22:43:26 +0200 (CEST) Received: from stefan by flocke.weilnetz.de with local (Exim 4.72) (envelope-from ) id 1QxmCT-0001nW-Ml; Sun, 28 Aug 2011 22:43:25 +0200 From: Stefan Weil To: QEMU Developers Date: Sun, 28 Aug 2011 22:43:15 +0200 Message-Id: <1314564200-6872-3-git-send-email-weil@mail.berlios.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1314564200-6872-1-git-send-email-weil@mail.berlios.de> References: <1314564200-6872-1-git-send-email-weil@mail.berlios.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 78.47.199.172 Cc: Kevin Wolf Subject: [Qemu-devel] [PATCH 2/7] block/vvfat: Fix packing for w32 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 Use QEMU_PACKED to eliminate the effects of compiler option -mms-bitfields. Cc: Kevin Wolf Signed-off-by: Stefan Weil Acked-by: Kevin Wolf --- block/vvfat.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/block/vvfat.c b/block/vvfat.c index d6a07ef..ae1c03d 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -200,7 +200,7 @@ static int array_index(array_t* array, void* pointer) } /* These structures are used to fake a disk and the VFAT filesystem. - * For this reason we need to use __attribute__((packed)). */ + * For this reason we need to use QEMU_PACKED. */ typedef struct bootsector_t { uint8_t jump[3]; @@ -224,7 +224,7 @@ typedef struct bootsector_t { uint8_t signature; uint32_t id; uint8_t volume_label[11]; - } __attribute__((packed)) fat16; + } QEMU_PACKED fat16; struct { uint32_t sectors_per_fat; uint16_t flags; @@ -233,12 +233,12 @@ typedef struct bootsector_t { uint16_t info_sector; uint16_t backup_boot_sector; uint16_t ignored; - } __attribute__((packed)) fat32; + } QEMU_PACKED fat32; } u; uint8_t fat_type[8]; uint8_t ignored[0x1c0]; uint8_t magic[2]; -} __attribute__((packed)) bootsector_t; +} QEMU_PACKED bootsector_t; typedef struct { uint8_t head; @@ -253,7 +253,7 @@ typedef struct partition_t { mbr_chs_t end_CHS; uint32_t start_sector_long; uint32_t length_sector_long; -} __attribute__((packed)) partition_t; +} QEMU_PACKED partition_t; typedef struct mbr_t { uint8_t ignored[0x1b8]; @@ -261,7 +261,7 @@ typedef struct mbr_t { uint8_t ignored2[2]; partition_t partition[4]; uint8_t magic[2]; -} __attribute__((packed)) mbr_t; +} QEMU_PACKED mbr_t; typedef struct direntry_t { uint8_t name[8]; @@ -276,7 +276,7 @@ typedef struct direntry_t { uint16_t mdate; uint16_t begin; uint32_t size; -} __attribute__((packed)) direntry_t; +} QEMU_PACKED direntry_t; /* this structure are used to transparently access the files */