diff options
author | 2006-08-12 13:53:44 +0000 | |
---|---|---|
committer | 2006-08-12 13:53:44 +0000 | |
commit | 9ee13aaa333471afcec184efcada41e7e2ad7feb (patch) | |
tree | c639d7530e59f3eb64f188db263b3f2453838d25 /sys/dev/vnd.c | |
parent | KNF tweak. (diff) | |
download | wireguard-openbsd-9ee13aaa333471afcec184efcada41e7e2ad7feb.tar.xz wireguard-openbsd-9ee13aaa333471afcec184efcada41e7e2ad7feb.zip |
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.
Diffstat (limited to 'sys/dev/vnd.c')
-rw-r--r-- | sys/dev/vnd.c | 5 |
1 files changed, 2 insertions, 3 deletions
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; |