diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-06-02 02:35:28 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-06-02 02:35:28 +0000 |
commit | a336e6d76e401f4746af4f10efd25d0e22560a92 (patch) | |
tree | ed28222bd9e0d74a33285490ff72a7655690e355 | |
parent | a3e6d2ce9cdacb4c0004f819f5f5f2feda5b444a (diff) |
Rename cvtdisklabelv1 -> disklabeltokernlabel. It does more than just
convert version 0 to version 1 disklabels.
Suggested by deraadt@.
ok deraadt@ otto@
-rw-r--r-- | sys/arch/alpha/alpha/disksubr.c | 4 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/disksubr.c | 4 | ||||
-rw-r--r-- | sys/arch/arm/arm/disksubr.c | 4 | ||||
-rw-r--r-- | sys/arch/aviion/aviion/disksubr.c | 4 | ||||
-rw-r--r-- | sys/arch/hp300/hp300/disksubr.c | 4 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/disksubr.c | 4 | ||||
-rw-r--r-- | sys/arch/hppa64/hppa64/disksubr.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/i386/disksubr.c | 4 | ||||
-rw-r--r-- | sys/arch/landisk/landisk/disksubr.c | 4 | ||||
-rw-r--r-- | sys/arch/luna88k/luna88k/disksubr.c | 4 | ||||
-rw-r--r-- | sys/arch/mac68k/mac68k/disksubr.c | 4 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/disksubr.c | 4 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/disksubr.c | 4 | ||||
-rw-r--r-- | sys/arch/mvme68k/mvme68k/disksubr.c | 4 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/disksubr.c | 4 | ||||
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/disksubr.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/disksubr.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/disksubr.c | 4 | ||||
-rw-r--r-- | sys/arch/vax/vax/disksubr.c | 4 | ||||
-rw-r--r-- | sys/kern/subr_disk.c | 8 | ||||
-rw-r--r-- | sys/sys/disklabel.h | 4 |
21 files changed, 45 insertions, 43 deletions
diff --git a/sys/arch/alpha/alpha/disksubr.c b/sys/arch/alpha/alpha/disksubr.c index 484ac9aabf0..1cd40476a04 100644 --- a/sys/arch/alpha/alpha/disksubr.c +++ b/sys/arch/alpha/alpha/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.71 2007/05/31 19:57:43 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.72 2007/06/02 02:35:26 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -194,7 +194,7 @@ done: bp->b_flags |= B_INVAL; brelse(bp); } - cvtdisklabelv1(lp); + disklabeltokernlabel(lp); return (msg); } diff --git a/sys/arch/amd64/amd64/disksubr.c b/sys/arch/amd64/amd64/disksubr.c index de0b58008f8..b4d657de6c3 100644 --- a/sys/arch/amd64/amd64/disksubr.c +++ b/sys/arch/amd64/amd64/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.35 2007/05/31 19:57:43 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.36 2007/06/02 02:35:26 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -316,7 +316,7 @@ done: bp->b_flags |= B_INVAL; brelse(bp); } - cvtdisklabelv1(lp); + disklabeltokernlabel(lp); return (msg); } diff --git a/sys/arch/arm/arm/disksubr.c b/sys/arch/arm/arm/disksubr.c index 94cb1399a53..5657eb7489f 100644 --- a/sys/arch/arm/arm/disksubr.c +++ b/sys/arch/arm/arm/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.30 2007/05/31 19:57:43 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.31 2007/06/02 02:35:26 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -292,7 +292,7 @@ done: bp->b_flags |= B_INVAL; brelse(bp); } - cvtdisklabelv1(lp); + disklabeltokernlabel(lp); return (msg); } diff --git a/sys/arch/aviion/aviion/disksubr.c b/sys/arch/aviion/aviion/disksubr.c index e0b979c8fa8..0f4e36e6b9c 100644 --- a/sys/arch/aviion/aviion/disksubr.c +++ b/sys/arch/aviion/aviion/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.21 2007/05/31 19:57:43 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.22 2007/06/02 02:35:26 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -292,7 +292,7 @@ done: bp->b_flags |= B_INVAL; brelse(bp); } - cvtdisklabelv1(lp); + disklabeltokernlabel(lp); return (msg); } diff --git a/sys/arch/hp300/hp300/disksubr.c b/sys/arch/hp300/hp300/disksubr.c index fa1c307352d..2ef84441d2e 100644 --- a/sys/arch/hp300/hp300/disksubr.c +++ b/sys/arch/hp300/hp300/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.28 2007/05/31 22:06:02 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.29 2007/06/02 02:35:26 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.9 1997/04/01 03:12:13 scottr Exp $ */ /* @@ -125,7 +125,7 @@ done: bp->b_flags = B_INVAL | B_AGE; brelse(bp); } - cvtdisklabelv1(lp); + disklabeltokernlabel(lp); return (msg); } diff --git a/sys/arch/hppa/hppa/disksubr.c b/sys/arch/hppa/hppa/disksubr.c index 43dcba75781..d0f40529112 100644 --- a/sys/arch/hppa/hppa/disksubr.c +++ b/sys/arch/hppa/hppa/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.51 2007/05/31 19:57:43 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.52 2007/06/02 02:35:26 krw Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -197,7 +197,7 @@ done: bp->b_flags |= B_INVAL; brelse(bp); } - cvtdisklabelv1(lp); + disklabeltokernlabel(lp); return (msg); } diff --git a/sys/arch/hppa64/hppa64/disksubr.c b/sys/arch/hppa64/hppa64/disksubr.c index e795309981d..86fdfac40cd 100644 --- a/sys/arch/hppa64/hppa64/disksubr.c +++ b/sys/arch/hppa64/hppa64/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.34 2007/05/31 19:57:43 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.35 2007/06/02 02:35:26 krw Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -193,7 +193,7 @@ done: bp->b_flags |= B_INVAL; brelse(bp); } - cvtdisklabelv1(lp); + disklabeltokernlabel(lp); return (msg); } diff --git a/sys/arch/i386/i386/disksubr.c b/sys/arch/i386/i386/disksubr.c index d1f26ecd91c..d62a6eff889 100644 --- a/sys/arch/i386/i386/disksubr.c +++ b/sys/arch/i386/i386/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.75 2007/05/31 19:57:43 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.76 2007/06/02 02:35:26 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -316,7 +316,7 @@ done: bp->b_flags |= B_INVAL; brelse(bp); } - cvtdisklabelv1(lp); + disklabeltokernlabel(lp); return (msg); } diff --git a/sys/arch/landisk/landisk/disksubr.c b/sys/arch/landisk/landisk/disksubr.c index 925547d3f84..fd9e3b63bd8 100644 --- a/sys/arch/landisk/landisk/disksubr.c +++ b/sys/arch/landisk/landisk/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.18 2007/05/31 19:57:43 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.19 2007/06/02 02:35:27 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -292,7 +292,7 @@ done: bp->b_flags |= B_INVAL; brelse(bp); } - cvtdisklabelv1(lp); + disklabeltokernlabel(lp); return (msg); } diff --git a/sys/arch/luna88k/luna88k/disksubr.c b/sys/arch/luna88k/luna88k/disksubr.c index 07d38871ee3..a2716c6d976 100644 --- a/sys/arch/luna88k/luna88k/disksubr.c +++ b/sys/arch/luna88k/luna88k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.13 2007/05/31 19:57:43 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.14 2007/06/02 02:35:27 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.12 2002/02/19 17:09:44 wiz Exp $ */ /* @@ -208,7 +208,7 @@ done: bp->b_flags = B_INVAL | B_AGE | B_READ; brelse(bp); } - cvtdisklabelv1(lp); + disklabeltokernlabel(lp); return (msg); } diff --git a/sys/arch/mac68k/mac68k/disksubr.c b/sys/arch/mac68k/mac68k/disksubr.c index 2dca33d49d0..e25f4512f81 100644 --- a/sys/arch/mac68k/mac68k/disksubr.c +++ b/sys/arch/mac68k/mac68k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.36 2007/05/31 22:06:02 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.37 2007/06/02 02:35:27 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.22 1997/11/26 04:18:20 briggs Exp $ */ /* @@ -436,7 +436,7 @@ done: bp->b_flags |= B_INVAL; brelse(bp); } - cvtdisklabelv1(lp); + disklabeltokernlabel(lp); return (msg); } diff --git a/sys/arch/macppc/macppc/disksubr.c b/sys/arch/macppc/macppc/disksubr.c index ead869a5465..c0e2beae511 100644 --- a/sys/arch/macppc/macppc/disksubr.c +++ b/sys/arch/macppc/macppc/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.40 2007/05/31 19:57:43 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.41 2007/06/02 02:35:27 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -381,7 +381,7 @@ done: bp->b_flags |= B_INVAL; brelse(bp); } - cvtdisklabelv1(lp); + disklabeltokernlabel(lp); return (msg); } diff --git a/sys/arch/mips64/mips64/disksubr.c b/sys/arch/mips64/mips64/disksubr.c index fa1f6becf0e..6ddae6e36f0 100644 --- a/sys/arch/mips64/mips64/disksubr.c +++ b/sys/arch/mips64/mips64/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.40 2007/05/31 19:57:43 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.41 2007/06/02 02:35:27 krw Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -201,7 +201,7 @@ done: bp->b_flags |= B_INVAL; brelse(bp); } - cvtdisklabelv1(lp); + disklabeltokernlabel(lp); return (msg); } diff --git a/sys/arch/mvme68k/mvme68k/disksubr.c b/sys/arch/mvme68k/mvme68k/disksubr.c index 431300b7c2e..fc48b2eebcb 100644 --- a/sys/arch/mvme68k/mvme68k/disksubr.c +++ b/sys/arch/mvme68k/mvme68k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.41 2007/05/31 22:06:02 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.42 2007/06/02 02:35:27 krw Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1995 Dale Rahn. @@ -147,7 +147,7 @@ done: bp->b_flags = B_INVAL | B_AGE | B_READ; brelse(bp); } - cvtdisklabelv1(lp); + disklabeltokernlabel(lp); return (msg); } diff --git a/sys/arch/mvme88k/mvme88k/disksubr.c b/sys/arch/mvme88k/mvme88k/disksubr.c index c888d4146f1..34169dfd5cc 100644 --- a/sys/arch/mvme88k/mvme88k/disksubr.c +++ b/sys/arch/mvme88k/mvme88k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.37 2007/05/31 22:06:03 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.38 2007/06/02 02:35:27 krw Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1995 Dale Rahn. @@ -144,7 +144,7 @@ done: bp->b_flags = B_INVAL | B_AGE | B_READ; brelse(bp); } - cvtdisklabelv1(lp); + disklabeltokernlabel(lp); return (msg); } diff --git a/sys/arch/mvmeppc/mvmeppc/disksubr.c b/sys/arch/mvmeppc/mvmeppc/disksubr.c index 2faaa2aa657..7965ae1d197 100644 --- a/sys/arch/mvmeppc/mvmeppc/disksubr.c +++ b/sys/arch/mvmeppc/mvmeppc/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.36 2007/05/31 19:57:44 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.37 2007/06/02 02:35:27 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -295,7 +295,7 @@ done: bp->b_flags |= B_INVAL; brelse(bp); } - cvtdisklabelv1(lp); + disklabeltokernlabel(lp); return (msg); } diff --git a/sys/arch/sparc/sparc/disksubr.c b/sys/arch/sparc/sparc/disksubr.c index 943546b1aac..510fbb6cfd3 100644 --- a/sys/arch/sparc/sparc/disksubr.c +++ b/sys/arch/sparc/sparc/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.47 2007/05/31 19:57:44 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.48 2007/06/02 02:35:27 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.16 1996/04/28 20:25:59 thorpej Exp $ */ /* @@ -186,7 +186,7 @@ done: bp->b_flags = B_INVAL | B_AGE | B_READ; brelse(bp); } - cvtdisklabelv1(lp); + disklabeltokernlabel(lp); return (msg); } diff --git a/sys/arch/sparc64/sparc64/disksubr.c b/sys/arch/sparc64/sparc64/disksubr.c index 0b85b5f3463..39fd2474119 100644 --- a/sys/arch/sparc64/sparc64/disksubr.c +++ b/sys/arch/sparc64/sparc64/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.26 2007/05/31 19:57:44 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.27 2007/06/02 02:35:27 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.13 2000/12/17 22:39:18 pk Exp $ */ /* @@ -185,7 +185,7 @@ done: bp->b_flags = B_INVAL | B_AGE | B_READ; brelse(bp); } - cvtdisklabelv1(lp); + disklabeltokernlabel(lp); return (msg); } diff --git a/sys/arch/vax/vax/disksubr.c b/sys/arch/vax/vax/disksubr.c index dce0ad98bae..a4da2292245 100644 --- a/sys/arch/vax/vax/disksubr.c +++ b/sys/arch/vax/vax/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.38 2007/05/31 22:31:04 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.39 2007/06/02 02:35:27 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1999/06/30 18:48:06 ragge Exp $ */ /* @@ -183,7 +183,7 @@ done: bp->b_flags = B_INVAL | B_AGE | B_READ; brelse(bp); } - cvtdisklabelv1(lp); + disklabeltokernlabel(lp); return (msg); } diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index d96842f664e..1b0a2c82e14 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_disk.c,v 1.44 2007/06/01 19:06:28 krw Exp $ */ +/* $OpenBSD: subr_disk.c,v 1.45 2007/06/02 02:35:27 krw Exp $ */ /* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */ /* @@ -182,10 +182,12 @@ dkcksum(struct disklabel *lp) } /* - * Convert an old disklabel to a v1 disklabel + * Convert an on-disk disklabel to a kernel disklabel, converting versions + * as required and applying constraints that kernel disklabels are guaranteed + * to satisfy. */ void -cvtdisklabelv1(struct disklabel *lp) +disklabeltokernlabel(struct disklabel *lp) { struct __partitionv0 *v0pp = (struct __partitionv0 *)lp->d_partitions; struct partition *pp = lp->d_partitions; diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h index 57ade14328e..b4359607a22 100644 --- a/sys/sys/disklabel.h +++ b/sys/sys/disklabel.h @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.h,v 1.33 2007/06/01 18:09:52 deraadt Exp $ */ +/* $OpenBSD: disklabel.h,v 1.34 2007/06/02 02:35:27 krw Exp $ */ /* $NetBSD: disklabel.h,v 1.41 1996/05/10 23:07:37 mark Exp $ */ /* @@ -381,7 +381,7 @@ struct partinfo { void diskerr(struct buf *, char *, char *, int, int, struct disklabel *); void disksort(struct buf *, struct buf *); u_int dkcksum(struct disklabel *); -void cvtdisklabelv1(struct disklabel *); +void disklabeltokernlabel(struct disklabel *); int setdisklabel(struct disklabel *, struct disklabel *, u_long, struct cpu_disklabel *); char *readdisklabel(dev_t, void (*)(struct buf *), struct disklabel *, |