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/hdfd.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/hdfd.c')
| -rw-r--r-- | sys/arch/atari/dev/hdfd.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/sys/arch/atari/dev/hdfd.c b/sys/arch/atari/dev/hdfd.c index 6c2fb17732b..01bdf99d490 100644 --- a/sys/arch/atari/dev/hdfd.c +++ b/sys/arch/atari/dev/hdfd.c @@ -1,4 +1,4 @@ -/* $NetBSD: hdfd.c,v 1.78 2014/07/25 08:10:32 dholland Exp $ */ +/* $NetBSD: hdfd.c,v 1.79 2014/12/31 19:52:04 christos Exp $ */ /*- * Copyright (c) 1996 Leo Weppelman @@ -91,7 +91,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.78 2014/07/25 08:10:32 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.79 2014/12/31 19:52:04 christos Exp $"); #include "opt_ddb.h" @@ -1304,17 +1304,16 @@ fdioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) switch (cmd) { case DIOCGDINFO: - fdgetdisklabel(fd, dev); - *(struct disklabel *)addr = *(fd->sc_dk.dk_label); - return 0; - case DIOCGPART: fdgetdisklabel(fd, dev); - ((struct partinfo *)addr)->disklab = fd->sc_dk.dk_label; - ((struct partinfo *)addr)->part = - &fd->sc_dk.dk_label->d_partitions[RAW_PART]; - return 0; + break; + } + + error = disk_ioctl(&fd->sc_dk, RAW_PART, cmd, addr, flag, l); + if (error != EPASSTHROUGH) + return error; + switch (cmd) { case DIOCWLABEL: if ((flag & FWRITE) == 0) return EBADF; |
