diff options
| author | christos <christos@NetBSD.org> | 2014-12-31 19:52:04 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2014-12-31 19:52:04 +0000 |
| commit | 4a331aac448bc6ebd006fa2ea80af68f57c666eb (patch) | |
| tree | a61e69370e02aa55f74db2134eb4c32a0ce55868 /sys/arch/atari/dev/fd.c | |
| parent | 7e0dbe4aff861a57f08f15f13b40808d8bd26a6f (diff) | |
make more drivers use disk_ioctl, and add a dev parameter to it so that
we can merge the "easy" disklabel ioctls to it. Ultimately all this will
go do dk_ioctl once all the drivers have been converted.
Diffstat (limited to 'sys/arch/atari/dev/fd.c')
| -rw-r--r-- | sys/arch/atari/dev/fd.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/sys/arch/atari/dev/fd.c b/sys/arch/atari/dev/fd.c index 02e2a060163..a694010cdaa 100644 --- a/sys/arch/atari/dev/fd.c +++ b/sys/arch/atari/dev/fd.c @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.80 2014/10/18 08:33:25 snj Exp $ */ +/* $NetBSD: fd.c,v 1.81 2014/12/31 19:52:04 christos Exp $ */ /* * Copyright (c) 1995 Leo Weppelman. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.80 2014/10/18 08:33:25 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.81 2014/12/31 19:52:04 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -432,17 +432,13 @@ fdioctl(dev_t dev, u_long cmd, void * addr, int flag, struct lwp *l) if ((sc->flags & FLPF_HAVELAB) == 0) return EBADF; + error = disk_ioctl(&sc->dkdev, RAW_PART, cmd, addr, flag, l); + if (error != EPASSTHROUGH) + return error; + switch (cmd) { case DIOCSBAD: return EINVAL; - case DIOCGDINFO: - *(struct disklabel *)addr = *(sc->dkdev.dk_label); - return 0; - case DIOCGPART: - ((struct partinfo *)addr)->disklab = sc->dkdev.dk_label; - ((struct partinfo *)addr)->part = - &sc->dkdev.dk_label->d_partitions[RAW_PART]; - return 0; #ifdef notyet /* XXX LWP */ case DIOCSRETRIES: case DIOCSSTEP: |
