diff options
author | Søren Schmidt <sos@FreeBSD.org> | 1999-12-07 22:25:28 +0000 |
---|---|---|
committer | Søren Schmidt <sos@FreeBSD.org> | 1999-12-07 22:25:28 +0000 |
commit | cb2a8dffa0a79ce0096335ff68f3dabd716626d5 (patch) | |
tree | 48f106ba8968fa5430d241fce1358592ea458176 /sys/fs | |
parent | f3a2511a25ce33bae3166c730959a167b94fa0eb (diff) | |
download | src-cb2a8dffa0a79ce0096335ff68f3dabd716626d5.tar.gz src-cb2a8dffa0a79ce0096335ff68f3dabd716626d5.zip |
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.
Notes
Notes:
svn path=/head/; revision=54272
Diffstat (limited to 'sys/fs')
-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 abb4d6ba0c62..2f93731b1d4e 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 }, |