aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-08-24 19:53:37 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-08-24 19:53:37 +0000
commita817d93656eb534cdbaaea68e44e5325169ad697 (patch)
tree46a2f3c55fa6c575471ac1fb530595f19bd3de3c /block.c
parentfd44d818219dc62f14d3f22d4d5cff5595a729e9 (diff)
fixed handling of relative filenames with -snapshot
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2136 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block.c')
-rw-r--r--block.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block.c b/block.c
index 12fc2ef456..fdaba4bcaf 100644
--- a/block.c
+++ b/block.c
@@ -335,8 +335,9 @@ int bdrv_open2(BlockDriverState *bs, const char *filename, int flags,
bdrv_delete(bs1);
get_tmp_filename(tmp_filename, sizeof(tmp_filename));
+ realpath(filename, backing_filename);
if (bdrv_create(&bdrv_qcow2, tmp_filename,
- total_size, filename, 0) < 0) {
+ total_size, backing_filename, 0) < 0) {
return -1;
}
filename = tmp_filename;