summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/arc/arc/disksubr.c10
-rw-r--r--sys/arch/i386/i386/disksubr.c10
2 files changed, 16 insertions, 4 deletions
diff --git a/sys/arch/arc/arc/disksubr.c b/sys/arch/arc/arc/disksubr.c
index 06af1ceec90..05119ae3251 100644
--- a/sys/arch/arc/arc/disksubr.c
+++ b/sys/arch/arc/arc/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.17 1997/09/29 01:12:20 deraadt Exp $ */
+/* $OpenBSD: disksubr.c,v 1.18 1997/10/02 00:50:53 deraadt Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -450,7 +450,13 @@ writedisklabel(dev, strat, lp, osdep)
goto done;
}
}
- error = ESRCH;
+
+ /* Write it in the regular place. */
+ *(struct disklabel *)bp->b_data = *lp;
+ bp->b_flags = B_BUSY | B_WRITE;
+ (*strat)(bp);
+ error = biowait(bp);
+ goto done;
done:
bp->b_flags |= B_INVAL;
diff --git a/sys/arch/i386/i386/disksubr.c b/sys/arch/i386/i386/disksubr.c
index 16d0b78ea8f..239e60cc3a0 100644
--- a/sys/arch/i386/i386/disksubr.c
+++ b/sys/arch/i386/i386/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.26 1997/09/29 01:12:21 deraadt Exp $ */
+/* $OpenBSD: disksubr.c,v 1.27 1997/10/02 00:50:51 deraadt Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -450,7 +450,13 @@ writedisklabel(dev, strat, lp, osdep)
goto done;
}
}
- error = ESRCH;
+
+ /* Write it in the regular place. */
+ *(struct disklabel *)bp->b_data = *lp;
+ bp->b_flags = B_BUSY | B_WRITE;
+ (*strat)(bp);
+ error = biowait(bp);
+ goto done;
done:
bp->b_flags |= B_INVAL;