Deleted 1024bytes/sector floppy code for PC-98 arch. The
1024bytes/sector code has not worked for long time and it should be re-implemented.
This commit is contained in:
parent
132de55f7b
commit
dd095881a0
@ -1,4 +1,4 @@
|
||||
/* $Id: msdosfs_denode.c,v 1.31 1998/02/09 06:09:51 eivind Exp $ */
|
||||
/* $Id: msdosfs_denode.c,v 1.32 1998/02/18 09:28:33 jkh Exp $ */
|
||||
/* $NetBSD: msdosfs_denode.c,v 1.28 1998/02/10 14:10:00 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
@ -470,13 +470,6 @@ detrunc(dep, length, flags, cred, p)
|
||||
NOCRED, &bp);
|
||||
} else {
|
||||
bn = de_blk(pmp, length);
|
||||
#ifdef PC98
|
||||
/*
|
||||
* 1024 byte/sector support
|
||||
*/
|
||||
if (pmp->pm_BytesPerSec == 1024)
|
||||
DETOV(dep)->v_flag |= 0x10000;
|
||||
#endif
|
||||
error = bread(DETOV(dep), bn, pmp->pm_bpcluster,
|
||||
NOCRED, &bp);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: msdosfs_vfsops.c,v 1.29 1998/03/01 22:46:27 msmith Exp $ */
|
||||
/* $Id: msdosfs_vfsops.c,v 1.30 1998/03/08 09:57:48 julian Exp $ */
|
||||
/* $NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $ */
|
||||
|
||||
/*-
|
||||
@ -369,10 +369,6 @@ mountmsdosfs(devvp, mp, p, argp)
|
||||
union bootsector *bsp;
|
||||
struct byte_bpb33 *b33;
|
||||
struct byte_bpb50 *b50;
|
||||
#ifdef PC98
|
||||
u_int pc98_wrk;
|
||||
u_int Phy_Sector_Size;
|
||||
#endif
|
||||
struct byte_bpb710 *b710;
|
||||
u_int8_t SecPerClust;
|
||||
int ronly, error;
|
||||
@ -434,7 +430,6 @@ mountmsdosfs(devvp, mp, p, argp)
|
||||
* boot signature. If not a dos boot sector then error out.
|
||||
*/
|
||||
#ifdef PC98
|
||||
devvp->v_flag &= 0xffff;
|
||||
error = bread(devvp, 0, 1024, NOCRED, &bp);
|
||||
#else
|
||||
error = bread(devvp, 0, 512, NOCRED, &bp);
|
||||
@ -515,41 +510,6 @@ mountmsdosfs(devvp, mp, p, argp)
|
||||
pmp->pm_HiddenSects = getushort(b33->bpbHiddenSecs);
|
||||
pmp->pm_HugeSectors = pmp->pm_Sectors;
|
||||
}
|
||||
#ifdef PC98 /* for PC98 added Satoshi Yasuda */
|
||||
Phy_Sector_Size = 512;
|
||||
if ((devvp->v_rdev>>8) == 2) { /* floppy check */
|
||||
if (((devvp->v_rdev&077) == 2) && (pmp->pm_HugeSectors == 1232)) {
|
||||
Phy_Sector_Size = 1024; /* 2HD */
|
||||
/*
|
||||
* 1024byte/sector support
|
||||
*/
|
||||
devvp->v_flag |= 0x10000;
|
||||
} else {
|
||||
if ((((devvp->v_rdev&077) == 3) /* 2DD 8 or 9 sector */
|
||||
&& (pmp->pm_HugeSectors == 1440)) /* 9 sector */
|
||||
|| (((devvp->v_rdev&077) == 4)
|
||||
&& (pmp->pm_HugeSectors == 1280)) /* 8 sector */
|
||||
|| (((devvp->v_rdev&077) == 5)
|
||||
&& (pmp->pm_HugeSectors == 2880))) { /* 1.44M */
|
||||
Phy_Sector_Size = 512;
|
||||
} else {
|
||||
if (((devvp->v_rdev&077) != 1)
|
||||
&& ((devvp->v_rdev&077) != 0)) { /* 2HC */
|
||||
error = EINVAL;
|
||||
goto error_exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
pc98_wrk = pmp->pm_BytesPerSec / Phy_Sector_Size;
|
||||
pmp->pm_BytesPerSec = Phy_Sector_Size;
|
||||
SecPerClust = SecPerClust * pc98_wrk;
|
||||
pmp->pm_HugeSectors = pmp->pm_HugeSectors * pc98_wrk;
|
||||
pmp->pm_ResSectors = pmp->pm_ResSectors * pc98_wrk;
|
||||
pmp->pm_FATsecs = pmp->pm_FATsecs * pc98_wrk;
|
||||
pmp->pm_SecPerTrack = pmp->pm_SecPerTrack * pc98_wrk;
|
||||
pmp->pm_HiddenSects = pmp->pm_HiddenSects * pc98_wrk;
|
||||
#endif /* */
|
||||
if (pmp->pm_HugeSectors > 0xffffffff / pmp->pm_BytesPerSec + 1) {
|
||||
/*
|
||||
* We cannot deal currently with this size of disk
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: msdosfs_vnops.c,v 1.64 1998/03/03 02:50:24 msmith Exp $ */
|
||||
/* $Id: msdosfs_vnops.c,v 1.65 1998/03/06 09:46:31 msmith Exp $ */
|
||||
/* $NetBSD: msdosfs_vnops.c,v 1.68 1998/02/10 14:10:04 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
@ -596,13 +596,6 @@ msdosfs_read(ap)
|
||||
error = bread(pmp->pm_devvp, lbn, blsize, NOCRED, &bp);
|
||||
} else {
|
||||
rablock = lbn + 1;
|
||||
#ifdef PC98
|
||||
/*
|
||||
* 1024byte/sector support
|
||||
*/
|
||||
if (pmp->pm_BytesPerSec == 1024)
|
||||
vp->v_flag |= 0x10000;
|
||||
#endif
|
||||
if (vp->v_lastr + 1 == lbn &&
|
||||
de_cn2off(pmp, rablock) < dep->de_FileSize) {
|
||||
rasize = pmp->pm_bpcluster;
|
||||
@ -708,13 +701,6 @@ msdosfs_write(ap)
|
||||
resid = uio->uio_resid;
|
||||
osize = dep->de_FileSize;
|
||||
|
||||
#ifdef PC98
|
||||
/*
|
||||
* 1024byte/sector support
|
||||
*/
|
||||
if (pmp->pm_BytesPerSec == 1024)
|
||||
thisvp->v_flag |= 0x10000;
|
||||
#endif
|
||||
/*
|
||||
* If we write beyond the end of the file, extend it to its ultimate
|
||||
* size ahead of the time to hopefully get a contiguous area.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: msdosfs_denode.c,v 1.31 1998/02/09 06:09:51 eivind Exp $ */
|
||||
/* $Id: msdosfs_denode.c,v 1.32 1998/02/18 09:28:33 jkh Exp $ */
|
||||
/* $NetBSD: msdosfs_denode.c,v 1.28 1998/02/10 14:10:00 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
@ -470,13 +470,6 @@ detrunc(dep, length, flags, cred, p)
|
||||
NOCRED, &bp);
|
||||
} else {
|
||||
bn = de_blk(pmp, length);
|
||||
#ifdef PC98
|
||||
/*
|
||||
* 1024 byte/sector support
|
||||
*/
|
||||
if (pmp->pm_BytesPerSec == 1024)
|
||||
DETOV(dep)->v_flag |= 0x10000;
|
||||
#endif
|
||||
error = bread(DETOV(dep), bn, pmp->pm_bpcluster,
|
||||
NOCRED, &bp);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: msdosfs_vfsops.c,v 1.29 1998/03/01 22:46:27 msmith Exp $ */
|
||||
/* $Id: msdosfs_vfsops.c,v 1.30 1998/03/08 09:57:48 julian Exp $ */
|
||||
/* $NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $ */
|
||||
|
||||
/*-
|
||||
@ -369,10 +369,6 @@ mountmsdosfs(devvp, mp, p, argp)
|
||||
union bootsector *bsp;
|
||||
struct byte_bpb33 *b33;
|
||||
struct byte_bpb50 *b50;
|
||||
#ifdef PC98
|
||||
u_int pc98_wrk;
|
||||
u_int Phy_Sector_Size;
|
||||
#endif
|
||||
struct byte_bpb710 *b710;
|
||||
u_int8_t SecPerClust;
|
||||
int ronly, error;
|
||||
@ -434,7 +430,6 @@ mountmsdosfs(devvp, mp, p, argp)
|
||||
* boot signature. If not a dos boot sector then error out.
|
||||
*/
|
||||
#ifdef PC98
|
||||
devvp->v_flag &= 0xffff;
|
||||
error = bread(devvp, 0, 1024, NOCRED, &bp);
|
||||
#else
|
||||
error = bread(devvp, 0, 512, NOCRED, &bp);
|
||||
@ -515,41 +510,6 @@ mountmsdosfs(devvp, mp, p, argp)
|
||||
pmp->pm_HiddenSects = getushort(b33->bpbHiddenSecs);
|
||||
pmp->pm_HugeSectors = pmp->pm_Sectors;
|
||||
}
|
||||
#ifdef PC98 /* for PC98 added Satoshi Yasuda */
|
||||
Phy_Sector_Size = 512;
|
||||
if ((devvp->v_rdev>>8) == 2) { /* floppy check */
|
||||
if (((devvp->v_rdev&077) == 2) && (pmp->pm_HugeSectors == 1232)) {
|
||||
Phy_Sector_Size = 1024; /* 2HD */
|
||||
/*
|
||||
* 1024byte/sector support
|
||||
*/
|
||||
devvp->v_flag |= 0x10000;
|
||||
} else {
|
||||
if ((((devvp->v_rdev&077) == 3) /* 2DD 8 or 9 sector */
|
||||
&& (pmp->pm_HugeSectors == 1440)) /* 9 sector */
|
||||
|| (((devvp->v_rdev&077) == 4)
|
||||
&& (pmp->pm_HugeSectors == 1280)) /* 8 sector */
|
||||
|| (((devvp->v_rdev&077) == 5)
|
||||
&& (pmp->pm_HugeSectors == 2880))) { /* 1.44M */
|
||||
Phy_Sector_Size = 512;
|
||||
} else {
|
||||
if (((devvp->v_rdev&077) != 1)
|
||||
&& ((devvp->v_rdev&077) != 0)) { /* 2HC */
|
||||
error = EINVAL;
|
||||
goto error_exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
pc98_wrk = pmp->pm_BytesPerSec / Phy_Sector_Size;
|
||||
pmp->pm_BytesPerSec = Phy_Sector_Size;
|
||||
SecPerClust = SecPerClust * pc98_wrk;
|
||||
pmp->pm_HugeSectors = pmp->pm_HugeSectors * pc98_wrk;
|
||||
pmp->pm_ResSectors = pmp->pm_ResSectors * pc98_wrk;
|
||||
pmp->pm_FATsecs = pmp->pm_FATsecs * pc98_wrk;
|
||||
pmp->pm_SecPerTrack = pmp->pm_SecPerTrack * pc98_wrk;
|
||||
pmp->pm_HiddenSects = pmp->pm_HiddenSects * pc98_wrk;
|
||||
#endif /* */
|
||||
if (pmp->pm_HugeSectors > 0xffffffff / pmp->pm_BytesPerSec + 1) {
|
||||
/*
|
||||
* We cannot deal currently with this size of disk
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: msdosfs_vnops.c,v 1.64 1998/03/03 02:50:24 msmith Exp $ */
|
||||
/* $Id: msdosfs_vnops.c,v 1.65 1998/03/06 09:46:31 msmith Exp $ */
|
||||
/* $NetBSD: msdosfs_vnops.c,v 1.68 1998/02/10 14:10:04 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
@ -596,13 +596,6 @@ msdosfs_read(ap)
|
||||
error = bread(pmp->pm_devvp, lbn, blsize, NOCRED, &bp);
|
||||
} else {
|
||||
rablock = lbn + 1;
|
||||
#ifdef PC98
|
||||
/*
|
||||
* 1024byte/sector support
|
||||
*/
|
||||
if (pmp->pm_BytesPerSec == 1024)
|
||||
vp->v_flag |= 0x10000;
|
||||
#endif
|
||||
if (vp->v_lastr + 1 == lbn &&
|
||||
de_cn2off(pmp, rablock) < dep->de_FileSize) {
|
||||
rasize = pmp->pm_bpcluster;
|
||||
@ -708,13 +701,6 @@ msdosfs_write(ap)
|
||||
resid = uio->uio_resid;
|
||||
osize = dep->de_FileSize;
|
||||
|
||||
#ifdef PC98
|
||||
/*
|
||||
* 1024byte/sector support
|
||||
*/
|
||||
if (pmp->pm_BytesPerSec == 1024)
|
||||
thisvp->v_flag |= 0x10000;
|
||||
#endif
|
||||
/*
|
||||
* If we write beyond the end of the file, extend it to its ultimate
|
||||
* size ahead of the time to hopefully get a contiguous area.
|
||||
|
Loading…
Reference in New Issue
Block a user