diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-08-01 15:51:11 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-08-01 15:51:11 +0000 |
commit | 93b6b2a3cd2bf7844dd2a9000cb4feefe7b0f597 (patch) | |
tree | 71f63ce27547fb15baaf270ca91746f671a59892 /qemu-img.c | |
parent | d62ca2bb9be6d6af2c0cbda47a6d7e51548060bf (diff) | |
download | qemu-93b6b2a3cd2bf7844dd2a9000cb4feefe7b0f597.zip qemu-93b6b2a3cd2bf7844dd2a9000cb4feefe7b0f597.tar.gz qemu-93b6b2a3cd2bf7844dd2a9000cb4feefe7b0f597.tar.bz2 |
show backing file name
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2073 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'qemu-img.c')
-rw-r--r-- | qemu-img.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -638,6 +638,8 @@ static int img_info(int argc, char **argv) BlockDriverState *bs; char fmt_name[128], size_buf[128], dsize_buf[128]; int64_t total_sectors, allocated_size; + char backing_filename[1024]; + char backing_filename2[1024]; fmt = NULL; for(;;) { @@ -688,6 +690,13 @@ static int img_info(int argc, char **argv) dsize_buf); if (bdrv_is_encrypted(bs)) printf("encrypted: yes\n"); + bdrv_get_backing_filename(bs, backing_filename, sizeof(backing_filename)); + if (backing_filename[0] != '\0') + path_combine(backing_filename2, sizeof(backing_filename2), + filename, backing_filename); + printf("backing file: %s (actual path: %s)\n", + backing_filename, + backing_filename2); bdrv_delete(bs); return 0; } |