block.h: Make BDRV_SECTOR_SIZE 64 bit safe
authorJes Sorensen <Jes.Sorensen@redhat.com>
Thu, 27 May 2010 13:46:55 +0000 (15:46 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 28 May 2010 11:14:26 +0000 (13:14 +0200)
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 <Jes.Sorensen@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.h

diff --git a/block.h b/block.h
index 9034ebb92404eac623dd7db820f66714ba6b12ac..756670d22fe02fbb67727f205e1367401ec75d43 100644 (file)
--- 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 {