From ad5bc00194a981af3435835b5ceb5d624a98caf7 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Tue, 19 Aug 2014 15:07:31 +0200 Subject: block: deprecate total_sectors, add total_bytes This prepares for removal of 512-byte sector units. Since a length unit cannot be negative, let's use an unsigned integer for the new total_bytes unit. Signed-off-by: Peter Wu --- include/block/block_int.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/block/block_int.h b/include/block/block_int.h index 233489547e..07f3d4426c 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -301,8 +301,11 @@ typedef struct BdrvOpBlocker BdrvOpBlocker; * copied as well. */ struct BlockDriverState { + /* TODO: replace by total_bytes */ + __attribute__ ((deprecated)) int64_t total_sectors; /* if we are reading a disk image, give its size in sectors */ + uint64_t total_bytes; /* file size in bytes for reading from disk images */ int read_only; /* if true, the media is read only */ int open_flags; /* flags used to open the file, re-used for re-open */ int encrypted; /* if true, the media is encrypted */ -- cgit v1.2.1