- Fixed warnings and typo.

- Recognize slice type 0x24 as FAT (only PC-98).

Submitted by:	Nobuyuki Koganemaru <kogane@koganemaru.co.jp>
This commit is contained in:
Yoshihiro Takahashi 2000-08-08 04:01:51 +00:00
parent f8842c0a18
commit 9ede9bda28
2 changed files with 6 additions and 1 deletions

View file

@ -45,12 +45,14 @@ Open_Disk(const char *name)
return Int_Open_Disk(name,0);
}
#ifndef PC98
static u_int32_t
Read_Int32(u_int32_t *p)
{
u_int8_t *bp = (u_int8_t *)p;
return bp[0] | (bp[1] << 8) | (bp[2] << 16) | (bp[3] << 24);
}
#endif
struct disk *
Int_Open_Disk(const char *name, u_long size)
@ -156,7 +158,7 @@ Int_Open_Disk(const char *name, u_long size)
#ifdef __i386__
#ifdef PC98
/* XXX -- Quick Hack!
* Check MS-DOG MO
* Check MS-DOS MO
*/
if ((*p == 0xf0 || *p == 0xf8) &&
(*(p+1) == 0xff) &&
@ -187,6 +189,7 @@ Int_Open_Disk(const char *name, u_long size)
case 0x21:
case 0x22:
case 0x23:
case 0x24:
ce = fat;
break;
#else /* IBM-PC */

View file

@ -153,6 +153,7 @@ Write_Extended(int fd, struct disk *new, struct disk *old, struct chunk *c1)
return 0;
}
#ifndef PC98
static void
Write_Int32(u_int32_t *p, u_int32_t v)
{
@ -162,6 +163,7 @@ Write_Int32(u_int32_t *p, u_int32_t v)
bp[2] = (v >> 16) & 0xff;
bp[3] = (v >> 24) & 0xff;
}
#endif
int
Write_Disk(struct disk *d1)