diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-10-02 00:50:54 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-10-02 00:50:54 +0000 |
commit | bfb58197f6071d88695e63426c8c516a8ff60512 (patch) | |
tree | dfea0fa575bb6d4d26b0edd8d1f0ba874de158de | |
parent | 5eb6e950adb5a657e4633ec696d56de09da5cdea (diff) |
no more ESRCH from writedisklabel()
-rw-r--r-- | sys/arch/arc/arc/disksubr.c | 10 | ||||
-rw-r--r-- | sys/arch/i386/i386/disksubr.c | 10 |
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; |