aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorHervé Poussineau <hpoussin@reactos.org>2017-07-15 15:28:39 +0200
committerKevin Wolf <kwolf@redhat.com>2017-07-18 15:14:36 +0200
commit63d261cb0d87bef033c447654279c62f586af1da (patch)
treec04ff083d8495df0267f4c99f45a27363ee5329f /block
parent8c4517fd6e52de87c2e06dbb392a87eecc79d9e2 (diff)
downloadqemu-63d261cb0d87bef033c447654279c62f586af1da.zip
qemu-63d261cb0d87bef033c447654279c62f586af1da.tar.gz
qemu-63d261cb0d87bef033c447654279c62f586af1da.tar.bz2
vvfat: add a constant for bootsector name
Also add links to related compatibility problems. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/vvfat.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/block/vvfat.c b/block/vvfat.c
index eb266b5..36b4be9 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -71,6 +71,12 @@ void nonono(const char* file, int line, const char* msg) {
#endif
+/* bootsector OEM name. see related compatibility problems at:
+ * https://jdebp.eu/FGA/volume-boot-block-oem-name-field.html
+ * http://seasip.info/Misc/oemid.html
+ */
+#define BOOTSECTOR_OEM_NAME "MSWIN4.1"
+
#define DIR_DELETED 0xe5
#define DIR_KANJI DIR_DELETED
#define DIR_KANJI_FAKE 0x05
@@ -1028,7 +1034,7 @@ static int init_directories(BDRVVVFATState* s,
bootsector->jump[0]=0xeb;
bootsector->jump[1]=0x3e;
bootsector->jump[2]=0x90;
- memcpy(bootsector->name, "MSWIN4.1", 8);
+ memcpy(bootsector->name, BOOTSECTOR_OEM_NAME, 8);
bootsector->sector_size=cpu_to_le16(0x200);
bootsector->sectors_per_cluster=s->sectors_per_cluster;
bootsector->reserved_sectors=cpu_to_le16(1);