aboutsummaryrefslogtreecommitdiff
path: root/qemu-img.c
diff options
context:
space:
mode:
Diffstat (limited to 'qemu-img.c')
-rw-r--r--qemu-img.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/qemu-img.c b/qemu-img.c
index f1a8aebf5e..2dffe8e3a4 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -235,7 +235,7 @@ static int img_create(int argc, char **argv)
const char *fmt = "raw";
const char *filename;
const char *base_filename = NULL;
- int64_t size;
+ uint64_t size;
const char *p;
BlockDriver *drv;
@@ -300,7 +300,7 @@ static int img_create(int argc, char **argv)
printf(", backing_file=%s",
base_filename);
}
- printf(", size=%" PRId64 " kB\n", (int64_t) (size / 1024));
+ printf(", size=%" PRIu64 " kB\n", size / 1024);
ret = bdrv_create(drv, filename, size / 512, base_filename, flags);
if (ret < 0) {
if (ret == -ENOTSUP) {
@@ -410,7 +410,8 @@ static int img_convert(int argc, char **argv)
const char *fmt, *out_fmt, *out_filename;
BlockDriver *drv;
BlockDriverState **bs, *out_bs;
- int64_t total_sectors, nb_sectors, sector_num, bs_offset, bs_sectors;
+ int64_t total_sectors, nb_sectors, sector_num, bs_offset;
+ uint64_t bs_sectors;
uint8_t buf[IO_BUF_SIZE];
const uint8_t *buf1;
BlockDriverInfo bdi;
@@ -655,7 +656,8 @@ static int img_info(int argc, char **argv)
BlockDriver *drv;
BlockDriverState *bs;
char fmt_name[128], size_buf[128], dsize_buf[128];
- int64_t total_sectors, allocated_size;
+ uint64_t total_sectors;
+ int64_t allocated_size;
char backing_filename[1024];
char backing_filename2[1024];
BlockDriverInfo bdi;