Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arc/arc if there is MBR, but there isn't BSD MBR pa...
details: https://anonhg.NetBSD.org/src/rev/4fee75996f3b
branches: trunk
changeset: 483935:4fee75996f3b
user: soda <soda%NetBSD.org@localhost>
date: Tue Mar 21 09:44:57 2000 +0000
description:
if there is MBR, but there isn't BSD MBR partition entry,
writedisklabel(9) paniced.
pointed out and fixed by Shuichiro URATA <ur%a-r.org@localhost>, thanks.
diffstat:
sys/arch/arc/arc/disksubr.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (29 lines):
diff -r f1a004d0f3a1 -r 4fee75996f3b sys/arch/arc/arc/disksubr.c
--- a/sys/arch/arc/arc/disksubr.c Tue Mar 21 09:33:45 2000 +0000
+++ b/sys/arch/arc/arc/disksubr.c Tue Mar 21 09:44:57 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.7 2000/01/23 21:01:51 soda Exp $ */
+/* $NetBSD: disksubr.c,v 1.8 2000/03/21 09:44:57 soda Exp $ */
/* $OpenBSD: disksubr.c,v 1.14 1997/05/08 00:14:29 deraadt Exp $ */
/* NetBSD: disksubr.c,v 1.40 1999/05/06 15:45:51 christos Exp */
@@ -451,13 +451,13 @@
if (ourdp == NO_MBR_SIGNATURE)
goto nombrpart;
- if (ourdp->mbrp_typ == MBR_PTYPE_OPENBSD) {
- /* do not override OpenBSD disklabel */
- error = ESRCH;
- goto done;
- }
+ if (ourdp) {
+ if (ourdp->mbrp_typ == MBR_PTYPE_OPENBSD) {
+ /* do not override OpenBSD disklabel */
+ error = ESRCH;
+ goto done;
+ }
- if (ourdp) {
/* need sector address for SCSI/IDE,
cylinder for ESDI/ST506/RLL */
dospartoff = ourdp->mbrp_start;
Home |
Main Index |
Thread Index |
Old Index