Commit 7852e5da32b6d4e0993130bf28d7d3fceacb2e31
1 parent
4bf27c24
restore rw support for vvfat
(Carlo Marcelo Arenas) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4080 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
9 additions
and
5 deletions
block-qcow.c
| ... | ... | @@ -752,11 +752,15 @@ static int qcow_create(const char *filename, int64_t total_size, |
| 752 | 752 | header_size = sizeof(header); |
| 753 | 753 | backing_filename_len = 0; |
| 754 | 754 | if (backing_file) { |
| 755 | - header.backing_file_offset = cpu_to_be64(header_size); | |
| 756 | - backing_filename_len = strlen(backing_file); | |
| 757 | - header.backing_file_size = cpu_to_be32(backing_filename_len); | |
| 758 | - header_size += backing_filename_len; | |
| 759 | - header.mtime = cpu_to_be32(0); | |
| 755 | + if (strcmp(backing_file, "fat:")) { | |
| 756 | + header.backing_file_offset = cpu_to_be64(header_size); | |
| 757 | + backing_filename_len = strlen(backing_file); | |
| 758 | + header.backing_file_size = cpu_to_be32(backing_filename_len); | |
| 759 | + header_size += backing_filename_len; | |
| 760 | + } else { | |
| 761 | + /* special backing file for vvfat */ | |
| 762 | + backing_file = NULL; | |
| 763 | + } | |
| 760 | 764 | header.cluster_bits = 9; /* 512 byte cluster to avoid copying |
| 761 | 765 | unmodifyed sectors */ |
| 762 | 766 | header.l2_bits = 12; /* 32 KB L2 tables */ | ... | ... |