summaryrefslogtreecommitdiffstats
path: root/lib/libdisk
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2000-08-08 04:01:51 +0000
committernyan <nyan@FreeBSD.org>2000-08-08 04:01:51 +0000
commit2a86f209a7b5bcce77f89bd98d34a760ce42d2c9 (patch)
treeb1398f345ade9fe669422ab01ecb6fc57130b6ca /lib/libdisk
parentfc5a57416d22a1e47cf3b2a356285f19f255d9b3 (diff)
downloadFreeBSD-src-2a86f209a7b5bcce77f89bd98d34a760ce42d2c9.zip
FreeBSD-src-2a86f209a7b5bcce77f89bd98d34a760ce42d2c9.tar.gz
- Fixed warnings and typo.
- Recognize slice type 0x24 as FAT (only PC-98). Submitted by: Nobuyuki Koganemaru <kogane@koganemaru.co.jp>
Diffstat (limited to 'lib/libdisk')
-rw-r--r--lib/libdisk/disk.c5
-rw-r--r--lib/libdisk/write_disk.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/libdisk/disk.c b/lib/libdisk/disk.c
index 1c7d5d7..9a35d45 100644
--- a/lib/libdisk/disk.c
+++ b/lib/libdisk/disk.c
@@ -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 */
diff --git a/lib/libdisk/write_disk.c b/lib/libdisk/write_disk.c
index 80ef12a..83c17b1 100644
--- a/lib/libdisk/write_disk.c
+++ b/lib/libdisk/write_disk.c
@@ -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)
OpenPOWER on IntegriCloud