]> Git Repo - qemu.git/commitdiff
block/vhdx: Remove redundant IEC binary prefixes definition
authorStefano Garzarella <[email protected]>
Wed, 27 Mar 2019 09:56:33 +0000 (10:56 +0100)
committerKevin Wolf <[email protected]>
Tue, 30 Apr 2019 13:29:00 +0000 (15:29 +0200)
IEC binary prefixes are already defined in "qemu/units.h",
so we can remove redundant definitions in "block/vhdx.h".

Signed-off-by: Stefano Garzarella <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: John Snow <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
block/vhdx.c
block/vhdx.h

index b785aef4b7b645cb67d3b2b75b7b49ad553df05f..7cd1fc3731d9064c1c513b576cb66101af80df97 100644 (file)
@@ -1889,7 +1889,8 @@ static int coroutine_fn vhdx_co_create(BlockdevCreateOptions *opts,
         return -EINVAL;
     }
     if (block_size > VHDX_BLOCK_SIZE_MAX) {
-        error_setg(errp, "Block size must not exceed %d", VHDX_BLOCK_SIZE_MAX);
+        error_setg(errp, "Block size must not exceed %" PRId64,
+                   VHDX_BLOCK_SIZE_MAX);
         return -EINVAL;
     }
 
index 1bfb4e4f73b4cfa68bca048d6074a5196957b36e..bf72090c8f8f9d3e4d7593b112640d2fa0c5421f 100644 (file)
 
 #ifndef BLOCK_VHDX_H
 #define BLOCK_VHDX_H
-
-#define KiB              (1 * 1024)
-#define MiB            (KiB * 1024)
-#define GiB            (MiB * 1024)
-#define TiB ((uint64_t) GiB * 1024)
+#include "qemu/units.h"
 
 #define DEFAULT_LOG_SIZE 1048576 /* 1MiB */
 /* Structures and fields present in the VHDX file */
This page took 0.02926 seconds and 4 git commands to generate.