mirror of
https://github.com/qemu/qemu.git
synced 2024-11-24 03:13:44 +08:00
restore rw support for vvfat
(Carlo Marcelo Arenas) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4080 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
4bf27c24bf
commit
7852e5da32
14
block-qcow.c
14
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user