Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mac68k/mac68k Before reading the (new) Apple Partit...
details: https://anonhg.NetBSD.org/src/rev/bc5d2add4905
branches: trunk
changeset: 533411:bc5d2add4905
user: scottr <scottr%NetBSD.org@localhost>
date: Sat Jun 29 19:44:52 2002 +0000
description:
Before reading the (new) Apple Partition Map laid out by sysinst, be sure
to clear the disk label. From Bob Nestor; part 2 of 2 of a fix for
PR 15528.
diffstat:
sys/arch/mac68k/mac68k/disksubr.c | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
diffs (40 lines):
diff -r 028b5a07bc69 -r bc5d2add4905 sys/arch/mac68k/mac68k/disksubr.c
--- a/sys/arch/mac68k/mac68k/disksubr.c Sat Jun 29 19:29:11 2002 +0000
+++ b/sys/arch/mac68k/mac68k/disksubr.c Sat Jun 29 19:44:52 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.41 2002/03/05 09:40:40 simonb Exp $ */
+/* $NetBSD: disksubr.c,v 1.42 2002/06/29 19:44:52 scottr Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -593,15 +593,24 @@
brelse(bp);
return (error);
#else
+ int i;
+
/*
- * Re-analyze the ondisk Apple Disk Partition Map and recompute
- * the faked incore disk label. This is necessary for sysinst,
- * which may have modified the disk layout. We don't (yet)
- * support writing real BSD disk labels, so this hack instead
- * causes the DIOCWDINFO ioctl invoked by sysinst to update the
- * in-core disk label when it is "written" to disk.
+ * Clear and re-analyze the ondisk Apple Disk Partition Map,
+ * then recompute the faked incore disk label. This is necessary
+ * for sysinst, which may have modified the disk layout. We don't
+ * (yet?) support writing real BSD disk labels, so this hack
+ * instead causes the DIOCWDINFO ioctl invoked by sysinst to
+ * update the in-core disk label when it is "written" to disk.
* This code was originally developed by Bob Nestor on 9/13/99.
*/
+ lp->d_npartitions = 0;
+ for (i = 0; i < MAXPARTITIONS; i++) {
+ lp->d_partitions[i].p_fstype = FS_UNUSED;
+ lp->d_partitions[i].p_offset = 0;
+ if (i != RAW_PART)
+ lp->d_partitions[i].p_size = 0;
+ }
return (readdisklabel(dev, strat, lp, osdep) ? EINVAL : 0);
#endif
}
Home |
Main Index |
Thread Index |
Old Index