diff options
author | sos <sos@FreeBSD.org> | 1999-12-07 22:25:28 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 1999-12-07 22:25:28 +0000 |
commit | 1f5f1ce072ff94bd81f7c6df33b7055f8304b035 (patch) | |
tree | 34f51ad89f627e73395ecb99b03db057246a2923 /sys/fs/cd9660 | |
parent | b4794466d10cd898a2d611bf35aa009e958089a2 (diff) | |
download | FreeBSD-src-1f5f1ce072ff94bd81f7c6df33b7055f8304b035.zip FreeBSD-src-1f5f1ce072ff94bd81f7c6df33b7055f8304b035.tar.gz |
Commit the kernel part of our DVD support. Nothing much to say really,
its just a number of new ioctl's, the rest is done in userland.
Diffstat (limited to 'sys/fs/cd9660')
-rw-r--r-- | sys/fs/cd9660/cd9660_vnops.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c index abb4d6b..2f93731 100644 --- a/sys/fs/cd9660/cd9660_vnops.c +++ b/sys/fs/cd9660/cd9660_vnops.c @@ -51,6 +51,7 @@ #include <sys/malloc.h> #include <sys/dirent.h> #include <sys/unistd.h> +#include <sys/filio.h> #include <vm/vm.h> #include <vm/vm_zone.h> @@ -63,6 +64,7 @@ static int cd9660_setattr __P((struct vop_setattr_args *)); static int cd9660_access __P((struct vop_access_args *)); static int cd9660_getattr __P((struct vop_getattr_args *)); +static int cd9660_ioctl __P((struct vop_ioctl_args *)); static int cd9660_pathconf __P((struct vop_pathconf_args *)); static int cd9660_read __P((struct vop_read_args *)); struct isoreaddir; @@ -255,6 +257,33 @@ cd9660_getattr(ap) } /* + * Vnode op for ioctl. + */ +static int +cd9660_ioctl(ap) + struct vop_ioctl_args /* { + struct vnode *a_vp; + int a_command; + caddr_t a_data; + int a_fflag; + struct ucred *a_cred; + struct proc *a_p; + } */ *ap; +{ + struct vnode *vp = ap->a_vp; + struct iso_node *ip = VTOI(vp); + + switch (ap->a_command) { + + case FIOGETLBA: + *(int *)(ap->a_data) = ip->iso_start; + return 0; + default: + return (ENOTTY); + } +} + +/* * Vnode op for reading. */ static int @@ -857,6 +886,7 @@ static struct vnodeopv_entry_desc cd9660_vnodeop_entries[] = { { &vop_cachedlookup_desc, (vop_t *) cd9660_lookup }, { &vop_getattr_desc, (vop_t *) cd9660_getattr }, { &vop_inactive_desc, (vop_t *) cd9660_inactive }, + { &vop_ioctl_desc, (vop_t *) cd9660_ioctl }, { &vop_islocked_desc, (vop_t *) vop_stdislocked }, { &vop_lock_desc, (vop_t *) vop_stdlock }, { &vop_lookup_desc, (vop_t *) vfs_cache_lookup }, |