diff options
author | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2016-12-14 18:59:13 +0000 |
---|---|---|
committer | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2016-12-14 18:59:13 +0000 |
commit | 30d0ff4c79e9a149e22d869fa65b602e954f12e0 (patch) | |
tree | 5a9ca279f9fae3bf16ea406bb3e03c94bee7259e | |
parent | d1124b823698e24b74b310384e001ded07839b80 (diff) |
Kill compat for old VNDIOCSET; ok deraadt@
-rw-r--r-- | sys/dev/vnd.c | 32 | ||||
-rw-r--r-- | sys/dev/vndioctl.h | 12 |
2 files changed, 3 insertions, 41 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 4a2f528a85b..3f161adc111 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.161 2016/11/12 11:16:59 jca Exp $ */ +/* $OpenBSD: vnd.c,v 1.162 2016/12/14 18:59:12 jca Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -396,7 +396,6 @@ vndioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) struct vnd_softc *sc; struct vnd_ioctl *vio; struct vnd_user *vnu; - struct vnd_user60 *vnu60; struct vattr vattr; struct nameidata nd; int error, part, pmask; @@ -545,35 +544,6 @@ vndioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) disk_unlock(&sc->sc_dk); break; - /* XXX kill after 6.1 */ - case VNDIOCGET60: - vnu60 = (struct vnd_user60 *)addr; - - if (vnu60->vnu60_unit == -1) - vnu60->vnu60_unit = unit; - if (vnu60->vnu60_unit >= numvnd) - return (ENXIO); - if (vnu60->vnu60_unit < 0) - return (EINVAL); - - sc = &vnd_softc[vnu60->vnu60_unit]; - - if (sc->sc_flags & VNF_INITED) { - error = VOP_GETATTR(sc->sc_vp, &vattr, p->p_ucred, p); - if (error) - return (error); - - strlcpy(vnu60->vnu60_file, sc->sc_file, - sizeof(vnu60->vnu60_file)); - vnu60->vnu60_dev = vattr.va_fsid; - vnu60->vnu60_ino = vattr.va_fileid; - } else { - vnu60->vnu60_dev = 0; - vnu60->vnu60_ino = 0; - } - - break; - case VNDIOCGET: vnu = (struct vnd_user *)addr; diff --git a/sys/dev/vndioctl.h b/sys/dev/vndioctl.h index 5e9d197105b..09c8ce9976d 100644 --- a/sys/dev/vndioctl.h +++ b/sys/dev/vndioctl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vndioctl.h,v 1.9 2016/11/12 10:59:37 jca Exp $ */ +/* $OpenBSD: vndioctl.h,v 1.10 2016/12/14 18:59:12 jca Exp $ */ /* $NetBSD: vndioctl.h,v 1.5 1995/01/25 04:46:30 cgd Exp $ */ /* @@ -67,14 +67,6 @@ struct vnd_user { ino_t vnu_ino; /* vnd inode */ }; -/* XXX kill after 6.1 */ -struct vnd_user60 { - char vnu60_file[90]; /* vnd file */ - int vnu60_unit; /* vnd unit */ - dev_t vnu60_dev; /* vnd device */ - ino_t vnu60_ino; /* vnd inode */ -}; - /* * Before you can use a unit, it must be configured with VNDIOCSET. * The configuration persists across opens and closes of the device; @@ -84,7 +76,7 @@ struct vnd_user60 { #define VNDIOCSET _IOWR('F', 0, struct vnd_ioctl) /* enable disk */ #define VNDIOCCLR _IOW('F', 1, struct vnd_ioctl) /* disable disk */ /* XXX kill after 6.1 */ -#define VNDIOCGET60 _IOWR('F', 2, struct vnd_user60) /* get disk info */ +/* #define VNDIOCGET60 _IOWR('F', 2, struct vnd_user60) */ #define VNDIOCGET _IOWR('F', 3, struct vnd_user) /* get disk info */ #endif /* !_SYS_VNDIOCTL_H_ */ |