Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/sys/arch/mac68k/mac68k Pull up revision 1.42 (requested...
details: https://anonhg.NetBSD.org/src/rev/e90f2f58ff6f
branches: netbsd-1-6
changeset: 528299:e90f2f58ff6f
user: lukem <lukem%NetBSD.org@localhost>
date: Sat Jun 29 23:24:54 2002 +0000
description:
Pull up revision 1.42 (requested by scottr in ticket #404):
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 52797329ae1e -r e90f2f58ff6f sys/arch/mac68k/mac68k/disksubr.c
--- a/sys/arch/mac68k/mac68k/disksubr.c Sat Jun 29 23:24:11 2002 +0000
+++ b/sys/arch/mac68k/mac68k/disksubr.c Sat Jun 29 23:24:54 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.41.8.1 2002/06/29 23:24:54 lukem 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