diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-06-10 05:42:49 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-06-10 05:42:49 +0000 |
commit | ab6babe8866ff300c47c1591537b0d619c275ae4 (patch) | |
tree | 066f2f01008da6cfe1636a2ef09d6b0d5d6a2c91 /sys/arch | |
parent | cefa688a1879056bfc03ec7352838f0229f86cd4 (diff) |
No need for two *LABELSECTOR and *LABELOFFSET defines that mean the
same thing. Keep LABELSECTOR and LABELOFFSET and nuke
ALPHA_LABELSECTOR and ALPHA_LABELOFFSET.
Kernel still compiles and boots.
Superfluidity pointed out by deraadt@.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/alpha/alpha/disksubr.c | 11 | ||||
-rw-r--r-- | sys/arch/alpha/include/disklabel.h | 8 |
2 files changed, 8 insertions, 11 deletions
diff --git a/sys/arch/alpha/alpha/disksubr.c b/sys/arch/alpha/alpha/disksubr.c index f2d1bd2e6e8..199b5acf00a 100644 --- a/sys/arch/alpha/alpha/disksubr.c +++ b/sys/arch/alpha/alpha/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.82 2007/06/09 23:06:45 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.83 2007/06/10 05:42:48 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -146,8 +146,8 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), bp = geteblk((int)lp->d_secsize); bp->b_dev = dev; - msg = readbsdlabel(bp, strat, 0, ALPHA_LABELSECTOR, ALPHA_LABELOFFSET, - lp, spoofonly); + msg = readbsdlabel(bp, strat, 0, LABELSECTOR, LABELOFFSET, lp, + spoofonly); if (msg) *lp = minilabel; if (msg) { @@ -406,9 +406,8 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), * a newer disklabel of another type with disklabel(8) and -r. */ dl = *lp; - msg = readbsdlabel(bp, strat, 0, ALPHA_LABELSECTOR, ALPHA_LABELOFFSET, - &dl, 0); - labeloffset = ALPHA_LABELOFFSET; + msg = readbsdlabel(bp, strat, 0, LABELSECTOR, LABELOFFSET, &dl, 0); + labeloffset = LABELOFFSET; if (msg == NULL) needcsum = 1; if (msg) { diff --git a/sys/arch/alpha/include/disklabel.h b/sys/arch/alpha/include/disklabel.h index 3ebdb8ba7d4..12523a08d15 100644 --- a/sys/arch/alpha/include/disklabel.h +++ b/sys/arch/alpha/include/disklabel.h @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.h,v 1.19 2006/10/20 23:47:42 krw Exp $ */ +/* $OpenBSD: disklabel.h,v 1.20 2007/06/10 05:42:48 krw Exp $ */ /* $NetBSD: disklabel.h,v 1.1 1995/02/13 23:07:34 cgd Exp $ */ /* @@ -34,13 +34,11 @@ #ifndef _MACHINE_DISKLABEL_H_ #define _MACHINE_DISKLABEL_H_ -#define ALPHA_LABELSECTOR 0 /* sector containing label */ -#define ALPHA_LABELOFFSET 64 /* offset of label in sector */ #define I386_LABELSECTOR 1 /* sector containing label */ #define I386_LABELOFFSET 0 /* offset of label in sector */ -#define LABELSECTOR ALPHA_LABELSECTOR -#define LABELOFFSET ALPHA_LABELOFFSET +#define LABELSECTOR 0 +#define LABELOFFSET 64 #define MAXPARTITIONS 16 /* number of partitions */ #define RAW_PART 2 /* raw partition: xx?c */ |