Message ID | 20170715132841.9865-3-hpoussin@reactos.org |
---|---|
State | New |
Headers | show |
On 07/15/2017 10:28 AM, Hervé Poussineau wrote: > Also add links to related compatibility problems. > > Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > --- > block/vvfat.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/block/vvfat.c b/block/vvfat.c > index c2674d7703..e585a8e0be 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); >
diff --git a/block/vvfat.c b/block/vvfat.c index c2674d7703..e585a8e0be 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);
Also add links to related compatibility problems. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> --- block/vvfat.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)