From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LaGJX-0002xu-D2 for qemu-devel@nongnu.org; Thu, 19 Feb 2009 16:20:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LaGJV-0002x6-Vn for qemu-devel@nongnu.org; Thu, 19 Feb 2009 16:20:10 -0500 Received: from [199.232.76.173] (port=35027 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LaGJU-0002wx-PF for qemu-devel@nongnu.org; Thu, 19 Feb 2009 16:20:08 -0500 Received: from mx2.redhat.com ([66.187.237.31]:38389) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LaGJU-00033C-6n for qemu-devel@nongnu.org; Thu, 19 Feb 2009 16:20:08 -0500 From: Eduardo Habkost Date: Thu, 19 Feb 2009 18:19:35 -0300 Message-Id: <1235078376-25559-4-git-send-email-ehabkost@redhat.com> In-Reply-To: <1235078376-25559-1-git-send-email-ehabkost@redhat.com> References: <1235078376-25559-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH 3/4] Move SECTOR_BITS/SECTOR_SIZE to block.h Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org We will use those defines on other parts of the Qemu code. Remove redundant SECTOR_SIZE define from block-vmdk.c, also. Signed-off-by: Eduardo Habkost --- block-vmdk.c | 1 - block.c | 3 --- block.h | 3 +++ 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/block-vmdk.c b/block-vmdk.c index 416fb95..7ac79b3 100644 --- a/block-vmdk.c +++ b/block-vmdk.c @@ -110,7 +110,6 @@ static int vmdk_probe(const uint8_t *buf, int buf_size, const char *filename) #define CHECK_CID 1 -#define SECTOR_SIZE 512 #define DESC_SIZE 20*SECTOR_SIZE // 20 sectors of 512 bytes each #define HEADER_SIZE 512 // first sector of 512 bytes diff --git a/block.c b/block.c index 4f4bf7c..ba7fcf6 100644 --- a/block.c +++ b/block.c @@ -38,9 +38,6 @@ #include #endif -#define SECTOR_BITS 9 -#define SECTOR_SIZE (1 << SECTOR_BITS) - typedef struct BlockDriverAIOCBSync { BlockDriverAIOCB common; QEMUBH *bh; diff --git a/block.h b/block.h index e1927dd..ee0d403 100644 --- a/block.h +++ b/block.h @@ -4,6 +4,9 @@ #include "qemu-aio.h" #include "qemu-common.h" +#define SECTOR_BITS 9 +#define SECTOR_SIZE (1 << SECTOR_BITS) + /* block.c */ typedef struct BlockDriver BlockDriver; -- 1.6.1