aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1999-08-14 11:40:51 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1999-08-14 11:40:51 +0000
commit49ff4debd3d4c155448b2b4e3b95b17d9eb575ed (patch)
tree18155d44b4b3b16a219615f98df0600bc15bfce8 /sys/contrib
parent5462f43fb0cc935e2bfee4f28c06ec3d1c71626b (diff)
downloadsrc-49ff4debd3d4c155448b2b4e3b95b17d9eb575ed.tar.gz
src-49ff4debd3d4c155448b2b4e3b95b17d9eb575ed.zip
Spring cleaning around strategy and disklabels/slices:
Introduce BUF_STRATEGY(struct buf *, int flag) macro, and use it throughout. please see comment in sys/conf.h about the flag argument. Remove strategy argument from all the diskslice/label/bad144 implementations, it should be found from the dev_t. Remove bogus and unused strategy1 routines. Remove open/close arguments from dssize(). Pick them up from dev_t. Remove unused and unfinished setgeom support from diskslice/label/bad144 code.
Notes
Notes: svn path=/head/; revision=49771
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/dev/fla/fla.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/contrib/dev/fla/fla.c b/sys/contrib/dev/fla/fla.c
index 0da0b6e315e8..8de635ed11b7 100644
--- a/sys/contrib/dev/fla/fla.c
+++ b/sys/contrib/dev/fla/fla.c
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: fla.c,v 1.1 1999/08/06 15:59:07 phk Exp $
+ * $Id: fla.c,v 1.2 1999/08/07 13:11:12 bde Exp $
*
*/
@@ -168,9 +168,10 @@ flaopen(dev_t dev, int flag, int fmt, struct proc *p)
dk_dd.d_secsize = DEV_BSIZE;
dk_dd.d_secpercyl = dk_dd.d_ntracks * dk_dd.d_nsectors;
- error = dsopen("fla", dev, fmt, 0, &sc->dk_slices, &dk_dd,
- flastrategy, NULL, &fla_cdevsw);
- return (error);
+ error = dsopen("fla", dev, fmt, 0, &sc->dk_slices, &dk_dd);
+ if (error)
+ return (error);
+ return (0);
}
static int
@@ -199,8 +200,7 @@ flaioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
dev2ul(dev), cmd, addr, flags, p);
unit = dkunit(dev);
sc = &softc[unit];
- error = dsioctl("fla", dev, cmd, addr, flags, &sc->dk_slices,
- flastrategy, NULL);
+ error = dsioctl("fla", dev, cmd, addr, flags, &sc->dk_slices);
if (error == ENOIOCTL)
error = ENOTTY;
return (error);
@@ -215,7 +215,7 @@ flastrategy(struct buf *bp)
static int busy;
enum doc2k_work what;
- if (fla_debug)
+ if (fla_debug > 1)
printf("flastrategy(%p) %lx %lx, %d, %ld, %p)\n",
bp, dev2ul(bp->b_dev), bp->b_flags, bp->b_blkno,
bp->b_bcount / DEV_BSIZE, bp->b_data);
@@ -261,7 +261,7 @@ flastrategy(struct buf *bp)
error = doc2k_rwe( unit, what, bp->b_pblkno,
bp->b_bcount / DEV_BSIZE, bp->b_data);
- if (fla_debug || error) {
+ if (fla_debug > 1 || error) {
printf("fla%d: %d = rwe(%p, %d, %d, %d, %ld, %p)\n",
unit, error, bp, unit, what, bp->b_pblkno,
bp->b_bcount / DEV_BSIZE, bp->b_data);
@@ -294,7 +294,7 @@ flapsize(dev_t dev)
if (!sc->nsect)
return 0;
- return (dssize(dev, &sc->dk_slices, flaopen, flaclose));
+ return (dssize(dev, &sc->dk_slices));
}
static int