aboutsummaryrefslogtreecommitdiff
path: root/block-qcow.c
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-03-18 06:52:48 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-03-18 06:52:48 +0000
commit7852e5da32b6d4e0993130bf28d7d3fceacb2e31 (patch)
treeaa4b8e82637b38d3c8c9125b224e28aae636a7bf /block-qcow.c
parent4bf27c24bf82b1b8ea725e1572b9942082c9a8df (diff)
downloadqemu-7852e5da32b6d4e0993130bf28d7d3fceacb2e31.zip
qemu-7852e5da32b6d4e0993130bf28d7d3fceacb2e31.tar.gz
qemu-7852e5da32b6d4e0993130bf28d7d3fceacb2e31.tar.bz2
restore rw support for vvfat
(Carlo Marcelo Arenas) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4080 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block-qcow.c')
-rw-r--r--block-qcow.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/block-qcow.c b/block-qcow.c
index 730ae67..0ac2b42 100644
--- a/block-qcow.c
+++ b/block-qcow.c
@@ -752,11 +752,15 @@ static int qcow_create(const char *filename, int64_t total_size,
header_size = sizeof(header);
backing_filename_len = 0;
if (backing_file) {
- header.backing_file_offset = cpu_to_be64(header_size);
- backing_filename_len = strlen(backing_file);
- header.backing_file_size = cpu_to_be32(backing_filename_len);
- header_size += backing_filename_len;
- header.mtime = cpu_to_be32(0);
+ if (strcmp(backing_file, "fat:")) {
+ header.backing_file_offset = cpu_to_be64(header_size);
+ backing_filename_len = strlen(backing_file);
+ header.backing_file_size = cpu_to_be32(backing_filename_len);
+ header_size += backing_filename_len;
+ } else {
+ /* special backing file for vvfat */
+ backing_file = NULL;
+ }
header.cluster_bits = 9; /* 512 byte cluster to avoid copying
unmodifyed sectors */
header.l2_bits = 12; /* 32 KB L2 tables */