diff options
author | 2007-06-10 05:42:48 +0000 | |
---|---|---|
committer | 2007-06-10 05:42:48 +0000 | |
commit | 41fe0d730e4e3c9a18d37d07c71c211e03b9f43d (patch) | |
tree | a66b7cb6e5c75b72653eef949f36f8c03c994604 | |
parent | Add netbt files to common files for "make tags" (diff) | |
download | wireguard-openbsd-41fe0d730e4e3c9a18d37d07c71c211e03b9f43d.tar.xz wireguard-openbsd-41fe0d730e4e3c9a18d37d07c71c211e03b9f43d.zip |
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@.
-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 */ |