From patchwork Fri May 28 16:46:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [08/14] block.h: Make BDRV_SECTOR_SIZE 64 bit safe Date: Fri, 28 May 2010 06:46:07 -0000 From: Kevin Wolf X-Patchwork-Id: 53918 Message-Id: <1275065173-24045-9-git-send-email-kwolf@redhat.com> To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Jes Sorensen C defaults to int, so make definition of BDRV_SECTOR_SIZE 64 bit safe as it and BDRV_SECTOR_MASK may be used against 64 bit addresses. Signed-off-by: Jes Sorensen Signed-off-by: Kevin Wolf --- block.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/block.h b/block.h index 9034ebb..756670d 100644 --- a/block.h +++ b/block.h @@ -38,7 +38,7 @@ typedef struct QEMUSnapshotInfo { #define BDRV_O_CACHE_MASK (BDRV_O_NOCACHE | BDRV_O_CACHE_WB) #define BDRV_SECTOR_BITS 9 -#define BDRV_SECTOR_SIZE (1 << BDRV_SECTOR_BITS) +#define BDRV_SECTOR_SIZE (1ULL << BDRV_SECTOR_BITS) #define BDRV_SECTOR_MASK ~(BDRV_SECTOR_SIZE - 1) typedef enum {