diff options
author | Martin Natano <natano@cvs.openbsd.org> | 2017-02-28 10:49:38 +0000 |
---|---|---|
committer | Martin Natano <natano@cvs.openbsd.org> | 2017-02-28 10:49:38 +0000 |
commit | 8a85c4a2e37f56e9615eca6575acb8632d572fac (patch) | |
tree | 8771d2696156d2697c4b13c67d207227654acd71 /sys/arch | |
parent | dda377334195e99d66dc6b37c32d383d020990a1 (diff) |
Switch geteblks()'s size argument from int to size_t. It's called with
unsigned variables as argument in most places anyway. Decrease the
chance of signedness/range mismatch issues.
ok stefan
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/alpha/alpha/disksubr.c | 6 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/disksubr.c | 6 | ||||
-rw-r--r-- | sys/arch/arm/arm/disksubr.c | 6 | ||||
-rw-r--r-- | sys/arch/arm64/arm64/disksubr.c | 6 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/disksubr.c | 6 | ||||
-rw-r--r-- | sys/arch/i386/i386/disksubr.c | 6 | ||||
-rw-r--r-- | sys/arch/landisk/landisk/disksubr.c | 6 | ||||
-rw-r--r-- | sys/arch/loongson/loongson/disksubr.c | 6 | ||||
-rw-r--r-- | sys/arch/luna88k/luna88k/disksubr.c | 6 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/disksubr.c | 6 | ||||
-rw-r--r-- | sys/arch/octeon/octeon/disksubr.c | 6 | ||||
-rw-r--r-- | sys/arch/sgi/sgi/disksubr.c | 6 | ||||
-rw-r--r-- | sys/arch/socppc/socppc/disksubr.c | 6 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/disksubr.c | 6 |
14 files changed, 42 insertions, 42 deletions
diff --git a/sys/arch/alpha/alpha/disksubr.c b/sys/arch/alpha/alpha/disksubr.c index af5923bc72e..5f0334388ba 100644 --- a/sys/arch/alpha/alpha/disksubr.c +++ b/sys/arch/alpha/alpha/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.99 2015/09/28 15:17:08 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.100 2017/02/28 10:49:37 natano Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -57,7 +57,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), goto done; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; if (spoofonly) @@ -109,7 +109,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) int error, i; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; error = readdisksector(bp, strat, lp, DL_BLKTOSEC(lp, LABELSECTOR)); diff --git a/sys/arch/amd64/amd64/disksubr.c b/sys/arch/amd64/amd64/disksubr.c index 327cbee4457..e79fe46301e 100644 --- a/sys/arch/amd64/amd64/disksubr.c +++ b/sys/arch/amd64/amd64/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.77 2015/09/29 20:24:25 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.78 2017/02/28 10:49:37 natano Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -93,7 +93,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), } /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; error = readdoslabel(bp, strat, lp, NULL, spoofonly); @@ -133,7 +133,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) struct buf *bp = NULL; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; if (readdoslabel(bp, strat, lp, &partoff, 1) != 0) diff --git a/sys/arch/arm/arm/disksubr.c b/sys/arch/arm/arm/disksubr.c index 3e294013e6f..c1677f65eb0 100644 --- a/sys/arch/arm/arm/disksubr.c +++ b/sys/arch/arm/arm/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.60 2015/09/27 20:20:23 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.61 2017/02/28 10:49:37 natano Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -63,7 +63,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), goto done; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; error = readdoslabel(bp, strat, lp, NULL, spoofonly); @@ -103,7 +103,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) struct buf *bp = NULL; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; if (readdoslabel(bp, strat, lp, &partoff, 1) != 0) diff --git a/sys/arch/arm64/arm64/disksubr.c b/sys/arch/arm64/arm64/disksubr.c index 6c99c2c7335..93d4e316e6b 100644 --- a/sys/arch/arm64/arm64/disksubr.c +++ b/sys/arch/arm64/arm64/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.1 2016/12/17 23:38:33 patrick Exp $ */ +/* $OpenBSD: disksubr.c,v 1.2 2017/02/28 10:49:37 natano Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -63,7 +63,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), goto done; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; error = readdoslabel(bp, strat, lp, NULL, spoofonly); @@ -103,7 +103,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) struct buf *bp = NULL; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; if (readdoslabel(bp, strat, lp, &partoff, 1) != 0) diff --git a/sys/arch/hppa/hppa/disksubr.c b/sys/arch/hppa/hppa/disksubr.c index 964ea1e1c11..261ecd2ee75 100644 --- a/sys/arch/hppa/hppa/disksubr.c +++ b/sys/arch/hppa/hppa/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.88 2016/02/24 18:25:50 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.89 2017/02/28 10:49:37 natano Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -60,7 +60,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), goto done; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; error = readliflabel(bp, strat, lp, NULL, spoofonly); @@ -231,7 +231,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) struct buf *bp = NULL; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; /* Read it in, slap the new label in, and write it back out */ diff --git a/sys/arch/i386/i386/disksubr.c b/sys/arch/i386/i386/disksubr.c index e502c3e0e5f..33bac668243 100644 --- a/sys/arch/i386/i386/disksubr.c +++ b/sys/arch/i386/i386/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.115 2015/09/29 20:24:25 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.116 2017/02/28 10:49:37 natano Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -93,7 +93,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), } /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; error = readdoslabel(bp, strat, lp, NULL, spoofonly); @@ -133,7 +133,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) struct buf *bp = NULL; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; if (readdoslabel(bp, strat, lp, &partoff, 1) != 0) diff --git a/sys/arch/landisk/landisk/disksubr.c b/sys/arch/landisk/landisk/disksubr.c index 563f526bbdf..15026798189 100644 --- a/sys/arch/landisk/landisk/disksubr.c +++ b/sys/arch/landisk/landisk/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.48 2015/09/27 20:20:23 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.49 2017/02/28 10:49:37 natano Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -63,7 +63,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), goto done; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; error = readdoslabel(bp, strat, lp, NULL, spoofonly); @@ -103,7 +103,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) struct buf *bp = NULL; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; if (readdoslabel(bp, strat, lp, &partoff, 1) != 0) diff --git a/sys/arch/loongson/loongson/disksubr.c b/sys/arch/loongson/loongson/disksubr.c index 89574f48946..b8183d2bab8 100644 --- a/sys/arch/loongson/loongson/disksubr.c +++ b/sys/arch/loongson/loongson/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.9 2015/09/27 20:20:23 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.10 2017/02/28 10:49:37 natano Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -63,7 +63,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), goto done; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; error = readdoslabel(bp, strat, lp, NULL, spoofonly); @@ -103,7 +103,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) struct buf *bp = NULL; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; if (readdoslabel(bp, strat, lp, &partoff, 1) != 0) diff --git a/sys/arch/luna88k/luna88k/disksubr.c b/sys/arch/luna88k/luna88k/disksubr.c index 588efd1e537..3536aff92c9 100644 --- a/sys/arch/luna88k/luna88k/disksubr.c +++ b/sys/arch/luna88k/luna88k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.58 2015/09/28 15:17:08 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.59 2017/02/28 10:49:37 natano Exp $ */ /* $NetBSD: disksubr.c,v 1.12 2002/02/19 17:09:44 wiz Exp $ */ /* @@ -113,7 +113,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), lp->d_flags |= D_VENDOR; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; if (spoofonly) @@ -164,7 +164,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) int error; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; error = disklabel_bsd_to_om(lp, (struct sun_disklabel *)bp->b_data); diff --git a/sys/arch/macppc/macppc/disksubr.c b/sys/arch/macppc/macppc/disksubr.c index afe6c630109..d4ebd4968c2 100644 --- a/sys/arch/macppc/macppc/disksubr.c +++ b/sys/arch/macppc/macppc/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.81 2016/02/24 18:25:50 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.82 2017/02/28 10:49:37 natano Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -66,7 +66,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), goto done; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; error = readdpmelabel(bp, strat, lp, NULL, spoofonly); @@ -191,7 +191,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) struct buf *bp = NULL; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; /* Read it in, slap the new label in, and write it back out */ diff --git a/sys/arch/octeon/octeon/disksubr.c b/sys/arch/octeon/octeon/disksubr.c index 89574f48946..b8183d2bab8 100644 --- a/sys/arch/octeon/octeon/disksubr.c +++ b/sys/arch/octeon/octeon/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.9 2015/09/27 20:20:23 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.10 2017/02/28 10:49:37 natano Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -63,7 +63,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), goto done; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; error = readdoslabel(bp, strat, lp, NULL, spoofonly); @@ -103,7 +103,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) struct buf *bp = NULL; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; if (readdoslabel(bp, strat, lp, &partoff, 1) != 0) diff --git a/sys/arch/sgi/sgi/disksubr.c b/sys/arch/sgi/sgi/disksubr.c index 6761e383ca0..c430ad44d8e 100644 --- a/sys/arch/sgi/sgi/disksubr.c +++ b/sys/arch/sgi/sgi/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.32 2016/02/24 18:25:50 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.33 2017/02/28 10:49:37 natano Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -63,7 +63,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), lp->d_flags |= D_VENDOR; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; error = readsgilabel(bp, strat, lp, NULL, spoofonly); @@ -210,7 +210,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) struct disklabel *dlp; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; if (readsgilabel(bp, strat, lp, &partoff, 1) != 0 && diff --git a/sys/arch/socppc/socppc/disksubr.c b/sys/arch/socppc/socppc/disksubr.c index 44e4ce954f5..326274d0524 100644 --- a/sys/arch/socppc/socppc/disksubr.c +++ b/sys/arch/socppc/socppc/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.20 2015/09/27 20:20:23 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.21 2017/02/28 10:49:37 natano Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -63,7 +63,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), goto done; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; error = readdoslabel(bp, strat, lp, NULL, spoofonly); @@ -103,7 +103,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) struct buf *bp = NULL; /* get a buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; if (readdoslabel(bp, strat, lp, &partoff, 1) != 0) diff --git a/sys/arch/sparc64/sparc64/disksubr.c b/sys/arch/sparc64/sparc64/disksubr.c index 80c72321c1f..607826f848e 100644 --- a/sys/arch/sparc64/sparc64/disksubr.c +++ b/sys/arch/sparc64/sparc64/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.71 2015/09/28 15:30:33 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.72 2017/02/28 10:49:37 natano Exp $ */ /* $NetBSD: disksubr.c,v 1.13 2000/12/17 22:39:18 pk Exp $ */ /* @@ -87,7 +87,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), #endif /* NCD > 0 */ /* get buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; if (spoofonly) @@ -143,7 +143,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) int error; /* get buffer and initialize it */ - bp = geteblk((int)lp->d_secsize); + bp = geteblk(lp->d_secsize); bp->b_dev = dev; error = disklabel_bsd_to_sun(lp, (struct sun_disklabel *)bp->b_data); |