diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2006-08-12 13:53:45 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2006-08-12 13:53:45 +0000 |
commit | f74250732895549b7c85a7f9636f38b94475e920 (patch) | |
tree | 78157c361443c45407c3b058b0f60682607e3c45 | |
parent | b1210a15cff97e8eeb959fce89dc1d8e27c7ed15 (diff) |
Setting d_secsize to DEV_BSIZE (or 1 << DEV_BSHIFT, or 512) and then
setting RAW_PART's p_size to d_secperunit * (d_secsize / DEV_BSIZE) is
a waste of a few ops. And p_size should be in sectors anyway.
Just set RAW_PART's p_size to d_secperunit to make usage consistant
across the tree.
Should be a no-op.
-rw-r--r-- | sys/arch/armish/stand/boot/wd.c | 5 | ||||
-rw-r--r-- | sys/arch/hp300/dev/hd.c | 8 | ||||
-rw-r--r-- | sys/arch/sparc/dev/presto.c | 5 | ||||
-rw-r--r-- | sys/dev/ata/wd.c | 5 | ||||
-rw-r--r-- | sys/dev/ramdisk.c | 5 | ||||
-rw-r--r-- | sys/dev/vnd.c | 5 |
6 files changed, 13 insertions, 20 deletions
diff --git a/sys/arch/armish/stand/boot/wd.c b/sys/arch/armish/stand/boot/wd.c index 662a246edb8..4ef15f789a2 100644 --- a/sys/arch/armish/stand/boot/wd.c +++ b/sys/arch/armish/stand/boot/wd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wd.c,v 1.3 2006/07/30 20:46:30 drahn Exp $ */ +/* $OpenBSD: wd.c,v 1.4 2006/08/12 13:53:44 krw Exp $ */ /* $NetBSD: wd.c,v 1.5 2005/12/11 12:17:06 christos Exp $ */ /*- @@ -143,8 +143,7 @@ wdgetdefaultlabel(wd, lp) lp->d_flags = 0; lp->d_partitions[RAW_PART].p_offset = 0; - lp->d_partitions[RAW_PART].p_size = - lp->d_secperunit * (lp->d_secsize / DEV_BSIZE); + lp->d_partitions[RAW_PART].p_size = lp->d_secperunit; lp->d_partitions[RAW_PART].p_fstype = FS_UNUSED; lp->d_npartitions = MAXPARTITIONS; /* RAW_PART + 1 ??? */ diff --git a/sys/arch/hp300/dev/hd.c b/sys/arch/hp300/dev/hd.c index d4c437cd61b..9d3ecb0eb78 100644 --- a/sys/arch/hp300/dev/hd.c +++ b/sys/arch/hp300/dev/hd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hd.c,v 1.40 2006/03/15 20:20:39 miod Exp $ */ +/* $OpenBSD: hd.c,v 1.41 2006/08/12 13:53:44 krw Exp $ */ /* $NetBSD: rd.c,v 1.33 1997/07/10 18:14:08 kleink Exp $ */ /* @@ -506,8 +506,7 @@ hdgetinfo(dev, rs, lp, spoofonly) lp->d_sbsize = SBSIZE; lp->d_partitions[RAW_PART].p_offset = 0; - lp->d_partitions[RAW_PART].p_size = - lp->d_secperunit * (lp->d_secsize / DEV_BSIZE); + lp->d_partitions[RAW_PART].p_size = lp->d_secperunit; lp->d_partitions[RAW_PART].p_fstype = FS_UNUSED; lp->d_npartitions = RAW_PART + 1; @@ -524,8 +523,7 @@ hdgetinfo(dev, rs, lp, spoofonly) /* XXX reset partition info as readdisklabel screws with it */ lp->d_partitions[0].p_size = 0; lp->d_partitions[RAW_PART].p_offset = 0; - lp->d_partitions[RAW_PART].p_size = - lp->d_secperunit * (lp->d_secsize / DEV_BSIZE); + lp->d_partitions[RAW_PART].p_size = lp->d_secperunit; lp->d_partitions[RAW_PART].p_fstype = FS_UNUSED; lp->d_npartitions = RAW_PART + 1; lp->d_checksum = dkcksum(lp); diff --git a/sys/arch/sparc/dev/presto.c b/sys/arch/sparc/dev/presto.c index 007db1a6503..6035b04682d 100644 --- a/sys/arch/sparc/dev/presto.c +++ b/sys/arch/sparc/dev/presto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: presto.c,v 1.3 2006/06/02 20:00:54 miod Exp $ */ +/* $OpenBSD: presto.c,v 1.4 2006/08/12 13:53:44 krw Exp $ */ /* * Copyright (c) 2003, Miodrag Vallat. * All rights reserved. @@ -390,8 +390,7 @@ presto_getdisklabel(struct presto_softc *sc) lp->d_flags = D_RAMDISK; lp->d_partitions[RAW_PART].p_offset = 0; - lp->d_partitions[RAW_PART].p_size = - lp->d_secperunit * (lp->d_secsize / DEV_BSIZE); + lp->d_partitions[RAW_PART].p_size = lp->d_secperunit; lp->d_partitions[RAW_PART].p_fstype = FS_UNUSED; lp->d_npartitions = RAW_PART + 1; diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c index 8ae9ccd52ee..9f30319e1b0 100644 --- a/sys/dev/ata/wd.c +++ b/sys/dev/ata/wd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wd.c,v 1.47 2006/03/05 22:49:22 krw Exp $ */ +/* $OpenBSD: wd.c,v 1.48 2006/08/12 13:53:44 krw Exp $ */ /* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */ /* @@ -838,8 +838,7 @@ wdgetdefaultlabel(struct wd_softc *wd, struct disklabel *lp) lp->d_flags = 0; lp->d_partitions[RAW_PART].p_offset = 0; - lp->d_partitions[RAW_PART].p_size = - lp->d_secperunit * (lp->d_secsize / DEV_BSIZE); + lp->d_partitions[RAW_PART].p_size = lp->d_secperunit; lp->d_partitions[RAW_PART].p_fstype = FS_UNUSED; lp->d_npartitions = RAW_PART + 1; diff --git a/sys/dev/ramdisk.c b/sys/dev/ramdisk.c index 0eb24402219..47cf20e2162 100644 --- a/sys/dev/ramdisk.c +++ b/sys/dev/ramdisk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ramdisk.c,v 1.26 2005/06/30 23:49:08 miod Exp $ */ +/* $OpenBSD: ramdisk.c,v 1.27 2006/08/12 13:53:44 krw Exp $ */ /* $NetBSD: ramdisk.c,v 1.8 1996/04/12 08:30:09 leo Exp $ */ /* @@ -498,8 +498,7 @@ rdgetdisklabel(struct rd_softc *sc) lp->d_flags = D_RAMDISK; lp->d_partitions[RAW_PART].p_offset = 0; - lp->d_partitions[RAW_PART].p_size = - lp->d_secperunit * (lp->d_secsize / DEV_BSIZE); + lp->d_partitions[RAW_PART].p_size = lp->d_secperunit; lp->d_partitions[RAW_PART].p_fstype = FS_UNUSED; lp->d_npartitions = RAW_PART + 1; diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 8ec9ff2159d..dd9c51577e6 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.60 2006/03/15 20:20:41 miod Exp $ */ +/* $OpenBSD: vnd.c,v 1.61 2006/08/12 13:53:44 krw Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -319,8 +319,7 @@ vndgetdisklabel(dev, sc) lp->d_flags = 0; lp->d_partitions[RAW_PART].p_offset = 0; - lp->d_partitions[RAW_PART].p_size = - lp->d_secperunit * (lp->d_secsize / DEV_BSIZE); + lp->d_partitions[RAW_PART].p_size = lp->d_secperunit; lp->d_partitions[RAW_PART].p_fstype = FS_UNUSED; lp->d_npartitions = RAW_PART + 1; |