Revision 2dedf83e
b/block/vvfat.c | ||
---|---|---|
868 | 868 |
{ |
869 | 869 |
direntry_t* entry=array_get_next(&(s->directory)); |
870 | 870 |
entry->attributes=0x28; /* archive | volume label */ |
871 |
snprintf((char*)entry->name,11,"QEMU VVFAT"); |
|
871 |
memcpy(entry->name,"QEMU VVF",8); |
|
872 |
memcpy(entry->extension,"AT ",3); |
|
872 | 873 |
} |
873 | 874 |
|
874 | 875 |
/* Now build FAT, and write back information into directory */ |
... | ... | |
2256 | 2257 |
c = c1; |
2257 | 2258 |
} |
2258 | 2259 |
|
2259 |
ftruncate(fd, size); |
|
2260 |
if (ftruncate(fd, size)) { |
|
2261 |
perror("ftruncate()"); |
|
2262 |
close(fd); |
|
2263 |
return -4; |
|
2264 |
} |
|
2260 | 2265 |
close(fd); |
2261 | 2266 |
|
2262 | 2267 |
return commit_mappings(s, first_cluster, dir_index); |
Also available in: Unified diff