aboutsummaryrefslogtreecommitdiff
path: root/qemu-img.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-17 01:35:20 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-17 01:35:20 +0000
commit96b8f136f52ea2dc5948fe24f0bf4483251ac280 (patch)
tree10d16286a88c1e1dee56261a491cb9b89703460b /qemu-img.c
parentbee8d6842d1421ce3456779492561a92530e9c5a (diff)
Fix bdrv_get_geometry to return uint64_t, by Andre Przywara.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3825 c046a42c-6fe2-441c-8c8c-71466251a162
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;