diff options
| author | KATO Takenori <kato@FreeBSD.org> | 1999-01-28 09:18:21 +0000 |
|---|---|---|
| committer | KATO Takenori <kato@FreeBSD.org> | 1999-01-28 09:18:21 +0000 |
| commit | a09bd8dae6ef3004a3670e2cea2916d8da26b108 (patch) | |
| tree | c78081ee444b2fd1d3e0e5238f724ed1c879d916 | |
| parent | 3109b17f322e61f751db3f120424a90ab90a7f36 (diff) | |
Notes
| -rw-r--r-- | sys/pc98/pc98/atcompat_diskslice.c | 10 | ||||
| -rw-r--r-- | sys/pc98/pc98/diskslice_machdep.c | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/sys/pc98/pc98/atcompat_diskslice.c b/sys/pc98/pc98/atcompat_diskslice.c index ad51bc05e3f6..9632bb352467 100644 --- a/sys/pc98/pc98/atcompat_diskslice.c +++ b/sys/pc98/pc98/atcompat_diskslice.c @@ -35,7 +35,7 @@ * * from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91 * from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $ - * $Id: atcompat_diskslice.c,v 1.12 1998/08/10 16:55:54 kato Exp $ + * $Id: atcompat_diskslice.c,v 1.13 1998/12/04 22:54:54 archie Exp $ */ /* @@ -114,11 +114,11 @@ check_part(sname, dp, offset, nsectors, ntracks, mbr_offset ) * apart from the cylinder being reduced modulo 1024. Always allow * 1023/255/63. */ - if (ssector < ssector1 + if ((ssector < ssector1 && ((chs_ssect == nsectors && dp->dp_shd == ntracks - 1 && chs_scyl == 1023) || (secpercyl != 0 - && (ssector1 - ssector) % (1024 * secpercyl) == 0)) + && (ssector1 - ssector) % (1024 * secpercyl) == 0))) || (dp->dp_scyl == 255 && dp->dp_shd == 255 && dp->dp_ssect == 255)) { TRACE(("%s: C/H/S start %d/%d/%d, start %lu: allow\n", @@ -133,11 +133,11 @@ check_part(sname, dp, offset, nsectors, ntracks, mbr_offset ) esector1 = ssector1 + dp->dp_size - 1; /* Allow certain bogus C/H/S values for esector, as above. */ - if (esector < esector1 + if ((esector < esector1 && ((chs_esect == nsectors && dp->dp_ehd == ntracks - 1 && chs_ecyl == 1023) || (secpercyl != 0 - && (esector1 - esector) % (1024 * secpercyl) == 0)) + && (esector1 - esector) % (1024 * secpercyl) == 0))) || (dp->dp_ecyl == 255 && dp->dp_ehd == 255 && dp->dp_esect == 255)) { TRACE(("%s: C/H/S end %d/%d/%d, end %lu: allow\n", diff --git a/sys/pc98/pc98/diskslice_machdep.c b/sys/pc98/pc98/diskslice_machdep.c index 5370462dcd06..39cad21fc7e6 100644 --- a/sys/pc98/pc98/diskslice_machdep.c +++ b/sys/pc98/pc98/diskslice_machdep.c @@ -35,7 +35,7 @@ * * from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91 * from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $ - * $Id: diskslice_machdep.c,v 1.16 1998/08/10 16:55:54 kato Exp $ + * $Id: diskslice_machdep.c,v 1.17 1998/12/04 22:54:54 archie Exp $ */ /* @@ -139,11 +139,11 @@ check_part(sname, dp, offset, nsectors, ntracks, mbr_offset ) * apart from the cylinder being reduced modulo 1024. Always allow * 1023/255/63. */ - if (ssector < ssector1 + if ((ssector < ssector1 && ((chs_ssect == nsectors && dp->dp_shd == ntracks - 1 && chs_scyl == 1023) || (secpercyl != 0 - && (ssector1 - ssector) % (1024 * secpercyl) == 0)) + && (ssector1 - ssector) % (1024 * secpercyl) == 0))) || (dp->dp_scyl == 255 && dp->dp_shd == 255 && dp->dp_ssect == 255)) { TRACE(("%s: C/H/S start %d/%d/%d, start %lu: allow\n", @@ -166,11 +166,11 @@ check_part(sname, dp, offset, nsectors, ntracks, mbr_offset ) #endif /* Allow certain bogus C/H/S values for esector, as above. */ - if (esector < esector1 + if ((esector < esector1 && ((chs_esect == nsectors && dp->dp_ehd == ntracks - 1 && chs_ecyl == 1023) || (secpercyl != 0 - && (esector1 - esector) % (1024 * secpercyl) == 0)) + && (esector1 - esector) % (1024 * secpercyl) == 0))) || (dp->dp_ecyl == 255 && dp->dp_ehd == 255 && dp->dp_esect == 255)) { TRACE(("%s: C/H/S end %d/%d/%d, end %lu: allow\n", |
