Home | History | Annotate | Line # | Download | only in common
vfs_syscalls_50.c revision 1.10.2.1
      1  1.10.2.1       mrg /*	$NetBSD: vfs_syscalls_50.c,v 1.10.2.1 2012/02/18 07:33:54 mrg Exp $	*/
      2       1.2  christos 
      3       1.2  christos /*-
      4       1.2  christos  * Copyright (c) 2008 The NetBSD Foundation, Inc.
      5       1.2  christos  * All rights reserved.
      6       1.2  christos  *
      7       1.2  christos  * This code is derived from software contributed to The NetBSD Foundation
      8       1.2  christos  * by Christos Zoulas.
      9       1.2  christos  *
     10       1.2  christos  * Redistribution and use in source and binary forms, with or without
     11       1.2  christos  * modification, are permitted provided that the following conditions
     12       1.2  christos  * are met:
     13       1.2  christos  * 1. Redistributions of source code must retain the above copyright
     14       1.2  christos  *    notice, this list of conditions and the following disclaimer.
     15       1.2  christos  * 2. Redistributions in binary form must reproduce the above copyright
     16       1.2  christos  *    notice, this list of conditions and the following disclaimer in the
     17       1.2  christos  *    documentation and/or other materials provided with the distribution.
     18       1.2  christos  * 3. All advertising materials mentioning features or use of this software
     19       1.2  christos  *    must display the following acknowledgement:
     20       1.2  christos  *        This product includes software developed by the NetBSD
     21       1.2  christos  *        Foundation, Inc. and its contributors.
     22       1.2  christos  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23       1.2  christos  *    contributors may be used to endorse or promote products derived
     24       1.2  christos  *    from this software without specific prior written permission.
     25       1.2  christos  *
     26       1.2  christos  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27       1.2  christos  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28       1.2  christos  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29       1.2  christos  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30       1.2  christos  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31       1.2  christos  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32       1.2  christos  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33       1.2  christos  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34       1.2  christos  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35       1.2  christos  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36       1.2  christos  * POSSIBILITY OF SUCH DAMAGE.
     37       1.2  christos  */
     38       1.2  christos #include <sys/cdefs.h>
     39  1.10.2.1       mrg __KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_50.c,v 1.10.2.1 2012/02/18 07:33:54 mrg Exp $");
     40       1.2  christos 
     41       1.2  christos #include <sys/param.h>
     42       1.2  christos #include <sys/systm.h>
     43       1.2  christos #include <sys/namei.h>
     44       1.2  christos #include <sys/filedesc.h>
     45       1.2  christos #include <sys/kernel.h>
     46       1.2  christos #include <sys/file.h>
     47       1.2  christos #include <sys/stat.h>
     48       1.2  christos #include <sys/socketvar.h>
     49       1.2  christos #include <sys/vnode.h>
     50       1.2  christos #include <sys/mount.h>
     51       1.2  christos #include <sys/proc.h>
     52       1.2  christos #include <sys/uio.h>
     53       1.2  christos #include <sys/dirent.h>
     54       1.2  christos #include <sys/kauth.h>
     55       1.2  christos #include <sys/time.h>
     56       1.2  christos #include <sys/vfs_syscalls.h>
     57       1.2  christos #ifndef LFS
     58       1.2  christos #define LFS
     59       1.2  christos #endif
     60       1.2  christos #include <sys/syscallargs.h>
     61       1.2  christos 
     62       1.2  christos #include <ufs/lfs/lfs_extern.h>
     63       1.2  christos 
     64       1.9  dholland #include <sys/quota.h>
     65  1.10.2.1       mrg #include <sys/quotactl.h>
     66       1.9  dholland #include <ufs/ufs/quota1.h>
     67       1.9  dholland 
     68       1.2  christos #include <compat/common/compat_util.h>
     69       1.2  christos #include <compat/sys/time.h>
     70       1.2  christos #include <compat/sys/stat.h>
     71       1.2  christos #include <compat/sys/dirent.h>
     72       1.2  christos #include <compat/sys/mount.h>
     73       1.2  christos 
     74       1.2  christos static void cvtstat(struct stat30 *, const struct stat *);
     75       1.2  christos 
     76       1.2  christos /*
     77       1.2  christos  * Convert from a new to an old stat structure.
     78       1.2  christos  */
     79       1.2  christos static void
     80       1.2  christos cvtstat(struct stat30 *ost, const struct stat *st)
     81       1.2  christos {
     82       1.2  christos 
     83       1.2  christos 	ost->st_dev = st->st_dev;
     84       1.2  christos 	ost->st_ino = st->st_ino;
     85       1.2  christos 	ost->st_mode = st->st_mode;
     86       1.2  christos 	ost->st_nlink = st->st_nlink;
     87       1.2  christos 	ost->st_uid = st->st_uid;
     88       1.2  christos 	ost->st_gid = st->st_gid;
     89       1.2  christos 	ost->st_rdev = st->st_rdev;
     90       1.2  christos 	timespec_to_timespec50(&st->st_atimespec, &ost->st_atimespec);
     91       1.2  christos 	timespec_to_timespec50(&st->st_mtimespec, &ost->st_mtimespec);
     92       1.2  christos 	timespec_to_timespec50(&st->st_ctimespec, &ost->st_ctimespec);
     93       1.2  christos 	timespec_to_timespec50(&st->st_birthtimespec, &ost->st_birthtimespec);
     94       1.2  christos 	ost->st_size = st->st_size;
     95       1.2  christos 	ost->st_blocks = st->st_blocks;
     96       1.2  christos 	ost->st_blksize = st->st_blksize;
     97       1.2  christos 	ost->st_flags = st->st_flags;
     98       1.2  christos 	ost->st_gen = st->st_gen;
     99       1.6     pooka 	memset(ost->st_spare, 0, sizeof(ost->st_spare));
    100       1.2  christos }
    101       1.2  christos 
    102       1.2  christos /*
    103       1.2  christos  * Get file status; this version follows links.
    104       1.2  christos  */
    105       1.2  christos /* ARGSUSED */
    106       1.2  christos int
    107       1.2  christos compat_50_sys___stat30(struct lwp *l, const struct compat_50_sys___stat30_args *uap, register_t *retval)
    108       1.2  christos {
    109       1.2  christos 	/* {
    110       1.2  christos 		syscallarg(const char *) path;
    111       1.2  christos 		syscallarg(struct stat30 *) ub;
    112       1.2  christos 	} */
    113       1.2  christos 	struct stat sb;
    114       1.2  christos 	struct stat30 osb;
    115       1.2  christos 	int error;
    116       1.2  christos 
    117       1.2  christos 	error = do_sys_stat(SCARG(uap, path), FOLLOW, &sb);
    118       1.2  christos 	if (error)
    119       1.2  christos 		return error;
    120       1.2  christos 	cvtstat(&osb, &sb);
    121       1.2  christos 	error = copyout(&osb, SCARG(uap, ub), sizeof (osb));
    122       1.2  christos 	return error;
    123       1.2  christos }
    124       1.2  christos 
    125       1.2  christos 
    126       1.2  christos /*
    127       1.2  christos  * Get file status; this version does not follow links.
    128       1.2  christos  */
    129       1.2  christos /* ARGSUSED */
    130       1.2  christos int
    131       1.2  christos compat_50_sys___lstat30(struct lwp *l, const struct compat_50_sys___lstat30_args *uap, register_t *retval)
    132       1.2  christos {
    133       1.2  christos 	/* {
    134       1.2  christos 		syscallarg(const char *) path;
    135       1.2  christos 		syscallarg(struct stat30 *) ub;
    136       1.2  christos 	} */
    137       1.2  christos 	struct stat sb;
    138       1.2  christos 	struct stat30 osb;
    139       1.2  christos 	int error;
    140       1.2  christos 
    141       1.2  christos 	error = do_sys_stat(SCARG(uap, path), NOFOLLOW, &sb);
    142       1.2  christos 	if (error)
    143       1.2  christos 		return error;
    144       1.2  christos 	cvtstat(&osb, &sb);
    145       1.2  christos 	error = copyout(&osb, SCARG(uap, ub), sizeof (osb));
    146       1.2  christos 	return error;
    147       1.2  christos }
    148       1.2  christos 
    149       1.2  christos /*
    150       1.2  christos  * Return status information about a file descriptor.
    151       1.2  christos  */
    152       1.2  christos /* ARGSUSED */
    153       1.2  christos int
    154       1.2  christos compat_50_sys___fstat30(struct lwp *l, const struct compat_50_sys___fstat30_args *uap, register_t *retval)
    155       1.2  christos {
    156       1.2  christos 	/* {
    157       1.2  christos 		syscallarg(int) fd;
    158       1.2  christos 		syscallarg(struct stat30 *) sb;
    159       1.2  christos 	} */
    160       1.2  christos 	struct stat sb;
    161       1.2  christos 	struct stat30 osb;
    162       1.2  christos 	int error;
    163       1.2  christos 
    164       1.4     njoly 	error = do_sys_fstat(SCARG(uap, fd), &sb);
    165       1.2  christos 	if (error)
    166       1.2  christos 		return error;
    167       1.2  christos 	cvtstat(&osb, &sb);
    168       1.2  christos 	error = copyout(&osb, SCARG(uap, sb), sizeof (osb));
    169       1.2  christos 	return error;
    170       1.2  christos }
    171       1.2  christos 
    172       1.2  christos /* ARGSUSED */
    173       1.2  christos int
    174       1.2  christos compat_50_sys___fhstat40(struct lwp *l, const struct compat_50_sys___fhstat40_args *uap, register_t *retval)
    175       1.2  christos {
    176       1.2  christos 	/* {
    177       1.2  christos 		syscallarg(const void *) fhp;
    178       1.2  christos 		syscallarg(size_t) fh_size;
    179       1.2  christos 		syscallarg(struct stat30 *) sb;
    180       1.2  christos 	} */
    181       1.2  christos 	struct stat sb;
    182       1.2  christos 	struct stat30 osb;
    183       1.2  christos 	int error;
    184       1.2  christos 
    185       1.2  christos 	error = do_fhstat(l, SCARG(uap, fhp), SCARG(uap, fh_size), &sb);
    186       1.2  christos 	if (error)
    187       1.2  christos 		return error;
    188       1.2  christos 	cvtstat(&osb, &sb);
    189       1.2  christos 	error = copyout(&osb, SCARG(uap, sb), sizeof (osb));
    190       1.2  christos 	return error;
    191       1.2  christos }
    192       1.2  christos 
    193       1.2  christos static int
    194       1.2  christos compat_50_do_sys_utimes(struct lwp *l, struct vnode *vp, const char *path,
    195       1.2  christos     int flag, const struct timeval50 *tptr)
    196       1.2  christos {
    197       1.3  christos 	struct timeval tv[2], *tvp;
    198       1.2  christos 	struct timeval50 tv50[2];
    199       1.3  christos 	if (tptr) {
    200       1.3  christos 		int error = copyin(tptr, tv50, sizeof(tv50));
    201       1.3  christos 		if (error)
    202       1.3  christos 			return error;
    203       1.3  christos 		timeval50_to_timeval(&tv50[0], &tv[0]);
    204       1.3  christos 		timeval50_to_timeval(&tv50[1], &tv[1]);
    205       1.3  christos 		tvp = tv;
    206       1.3  christos 	} else
    207       1.3  christos 		tvp = NULL;
    208       1.3  christos 	return do_sys_utimes(l, vp, path, flag, tvp, UIO_SYSSPACE);
    209       1.2  christos }
    210       1.2  christos 
    211       1.2  christos /*
    212       1.2  christos  * Set the access and modification times given a path name; this
    213       1.2  christos  * version follows links.
    214       1.2  christos  */
    215       1.2  christos /* ARGSUSED */
    216       1.2  christos int
    217       1.2  christos compat_50_sys_utimes(struct lwp *l, const struct compat_50_sys_utimes_args *uap,
    218       1.2  christos     register_t *retval)
    219       1.2  christos {
    220       1.2  christos 	/* {
    221       1.2  christos 		syscallarg(const char *) path;
    222       1.2  christos 		syscallarg(const struct timeval50 *) tptr;
    223       1.2  christos 	} */
    224       1.2  christos 
    225       1.2  christos 	return compat_50_do_sys_utimes(l, NULL, SCARG(uap, path), FOLLOW,
    226       1.2  christos 	    SCARG(uap, tptr));
    227       1.2  christos }
    228       1.2  christos 
    229       1.2  christos /*
    230       1.2  christos  * Set the access and modification times given a file descriptor.
    231       1.2  christos  */
    232       1.2  christos /* ARGSUSED */
    233       1.2  christos int
    234       1.2  christos compat_50_sys_futimes(struct lwp *l,
    235       1.2  christos     const struct compat_50_sys_futimes_args *uap, register_t *retval)
    236       1.2  christos {
    237       1.2  christos 	/* {
    238       1.2  christos 		syscallarg(int) fd;
    239       1.2  christos 		syscallarg(const struct timeval50 *) tptr;
    240       1.2  christos 	} */
    241       1.2  christos 	int error;
    242       1.2  christos 	struct file *fp;
    243       1.2  christos 
    244       1.2  christos 	/* fd_getvnode() will use the descriptor for us */
    245       1.2  christos 	if ((error = fd_getvnode(SCARG(uap, fd), &fp)) != 0)
    246       1.2  christos 		return error;
    247       1.2  christos 	error = compat_50_do_sys_utimes(l, fp->f_data, NULL, 0,
    248       1.2  christos 	    SCARG(uap, tptr));
    249       1.2  christos 	fd_putfile(SCARG(uap, fd));
    250       1.2  christos 	return error;
    251       1.2  christos }
    252       1.2  christos 
    253       1.2  christos /*
    254       1.2  christos  * Set the access and modification times given a path name; this
    255       1.2  christos  * version does not follow links.
    256       1.2  christos  */
    257       1.2  christos int
    258       1.2  christos compat_50_sys_lutimes(struct lwp *l,
    259       1.2  christos     const struct compat_50_sys_lutimes_args *uap, register_t *retval)
    260       1.2  christos {
    261       1.2  christos 	/* {
    262       1.2  christos 		syscallarg(const char *) path;
    263       1.2  christos 		syscallarg(const struct timeval50 *) tptr;
    264       1.2  christos 	} */
    265       1.2  christos 
    266       1.2  christos 	return compat_50_do_sys_utimes(l, NULL, SCARG(uap, path), NOFOLLOW,
    267       1.2  christos 	    SCARG(uap, tptr));
    268       1.2  christos }
    269       1.2  christos 
    270       1.2  christos int
    271       1.2  christos compat_50_sys_lfs_segwait(struct lwp *l,
    272       1.2  christos     const struct compat_50_sys_lfs_segwait_args *uap, register_t *retval)
    273       1.2  christos {
    274       1.2  christos 	/* {
    275       1.2  christos 		syscallarg(fsid_t *) fsidp;
    276       1.2  christos 		syscallarg(struct timeval50 *) tv;
    277       1.2  christos 	} */
    278       1.2  christos #ifdef notyet
    279       1.2  christos 	struct timeval atv;
    280       1.2  christos 	struct timeval50 atv50;
    281       1.2  christos 	fsid_t fsid;
    282       1.2  christos 	int error;
    283       1.2  christos 
    284       1.2  christos 	/* XXX need we be su to segwait? */
    285       1.2  christos 	if ((error = kauth_authorize_generic(l->l_cred, KAUTH_GENERIC_ISSUSER,
    286       1.2  christos 	    NULL)) != 0)
    287       1.2  christos 		return (error);
    288       1.2  christos 	if ((error = copyin(SCARG(uap, fsidp), &fsid, sizeof(fsid_t))) != 0)
    289       1.2  christos 		return (error);
    290       1.2  christos 
    291       1.2  christos 	if (SCARG(uap, tv)) {
    292       1.2  christos 		error = copyin(SCARG(uap, tv), &atv50, sizeof(atv50));
    293       1.2  christos 		if (error)
    294       1.2  christos 			return (error);
    295       1.2  christos 		timeval50_to_timeval(&atv50, &atv);
    296       1.2  christos 		if (itimerfix(&atv))
    297       1.2  christos 			return (EINVAL);
    298       1.2  christos 	} else /* NULL or invalid */
    299       1.2  christos 		atv.tv_sec = atv.tv_usec = 0;
    300       1.2  christos 	return lfs_segwait(&fsid, &atv);
    301       1.2  christos #else
    302       1.2  christos 	return ENOSYS;
    303       1.2  christos #endif
    304       1.2  christos }
    305       1.2  christos 
    306       1.2  christos int
    307       1.2  christos compat_50_sys_mknod(struct lwp *l,
    308       1.2  christos     const struct compat_50_sys_mknod_args *uap, register_t *retval)
    309       1.2  christos {
    310       1.2  christos 	/* {
    311       1.2  christos 		syscallarg(const char *) path;
    312       1.2  christos 		syscallarg(mode_t) mode;
    313       1.2  christos 		syscallarg(uint32_t) dev;
    314       1.2  christos 	} */
    315       1.2  christos 	return do_sys_mknod(l, SCARG(uap, path), SCARG(uap, mode),
    316       1.5      haad 	    SCARG(uap, dev), retval, UIO_USERSPACE);
    317       1.2  christos }
    318       1.7    bouyer 
    319       1.7    bouyer /* ARGSUSED */
    320       1.7    bouyer int
    321       1.7    bouyer compat_50_sys_quotactl(struct lwp *l, const struct compat_50_sys_quotactl_args *uap, register_t *retval)
    322       1.7    bouyer {
    323       1.7    bouyer 	/* {
    324       1.7    bouyer 		syscallarg(const char *) path;
    325       1.7    bouyer 		syscallarg(int) cmd;
    326       1.7    bouyer 		syscallarg(int) uid;
    327       1.7    bouyer 		syscallarg(void *) arg;
    328       1.7    bouyer 	} */
    329       1.7    bouyer 	struct vnode *vp;
    330  1.10.2.1       mrg 	struct mount *mp;
    331  1.10.2.1       mrg 	int q1cmd;
    332  1.10.2.1       mrg 	int idtype;
    333  1.10.2.1       mrg 	char *qfile;
    334       1.7    bouyer 	struct dqblk dqblk;
    335  1.10.2.1       mrg 	struct quotakey key;
    336  1.10.2.1       mrg 	struct quotaval blocks, files;
    337  1.10.2.1       mrg 	struct quotastat qstat;
    338  1.10.2.1       mrg 	int error;
    339       1.7    bouyer 
    340       1.7    bouyer 	error = namei_simple_user(SCARG(uap, path),
    341       1.7    bouyer 				NSM_FOLLOW_TRYEMULROOT, &vp);
    342       1.7    bouyer 	if (error != 0)
    343       1.7    bouyer 		return (error);
    344  1.10.2.1       mrg 
    345       1.7    bouyer 	mp = vp->v_mount;
    346  1.10.2.1       mrg 	q1cmd = SCARG(uap, cmd);
    347  1.10.2.1       mrg 	idtype = quota_idtype_from_ufs(q1cmd & SUBCMDMASK);
    348       1.7    bouyer 
    349  1.10.2.1       mrg 	switch ((q1cmd & ~SUBCMDMASK) >> SUBCMDSHIFT) {
    350       1.7    bouyer 	case Q_QUOTAON:
    351  1.10.2.1       mrg 		qfile = PNBUF_GET();
    352  1.10.2.1       mrg 		error = copyinstr(SCARG(uap, arg), qfile, PATH_MAX, NULL);
    353       1.7    bouyer 		if (error != 0) {
    354  1.10.2.1       mrg 			PNBUF_PUT(qfile);
    355  1.10.2.1       mrg 			break;
    356       1.7    bouyer 		}
    357  1.10.2.1       mrg 
    358  1.10.2.1       mrg 		error = vfs_quotactl_quotaon(mp, idtype, qfile);
    359  1.10.2.1       mrg 
    360  1.10.2.1       mrg 		PNBUF_PUT(qfile);
    361  1.10.2.1       mrg 		break;
    362       1.7    bouyer 
    363       1.7    bouyer 	case Q_QUOTAOFF:
    364  1.10.2.1       mrg 		error = vfs_quotactl_quotaoff(mp, idtype);
    365  1.10.2.1       mrg 		break;
    366       1.7    bouyer 
    367       1.7    bouyer 	case Q_GETQUOTA:
    368  1.10.2.1       mrg 		key.qk_idtype = idtype;
    369  1.10.2.1       mrg 		key.qk_id = SCARG(uap, uid);
    370  1.10.2.1       mrg 
    371  1.10.2.1       mrg 		key.qk_objtype = QUOTA_OBJTYPE_BLOCKS;
    372  1.10.2.1       mrg 		error = vfs_quotactl_get(mp, &key, &blocks);
    373  1.10.2.1       mrg 		if (error) {
    374  1.10.2.1       mrg 			break;
    375       1.7    bouyer 		}
    376  1.10.2.1       mrg 
    377  1.10.2.1       mrg 		key.qk_objtype = QUOTA_OBJTYPE_FILES;
    378  1.10.2.1       mrg 		error = vfs_quotactl_get(mp, &key, &files);
    379  1.10.2.1       mrg 		if (error) {
    380  1.10.2.1       mrg 			break;
    381       1.7    bouyer 		}
    382  1.10.2.1       mrg 
    383  1.10.2.1       mrg 		quotavals_to_dqblk(&blocks, &files, &dqblk);
    384       1.7    bouyer 		error = copyout(&dqblk, SCARG(uap, arg), sizeof(dqblk));
    385  1.10.2.1       mrg 		break;
    386       1.7    bouyer 
    387       1.7    bouyer 	case Q_SETQUOTA:
    388       1.7    bouyer 		error = copyin(SCARG(uap, arg), &dqblk, sizeof(dqblk));
    389  1.10.2.1       mrg 		if (error) {
    390  1.10.2.1       mrg 			break;
    391       1.7    bouyer 		}
    392  1.10.2.1       mrg 		dqblk_to_quotavals(&dqblk, &blocks, &files);
    393  1.10.2.1       mrg 
    394  1.10.2.1       mrg 		key.qk_idtype = idtype;
    395  1.10.2.1       mrg 		key.qk_id = SCARG(uap, uid);
    396  1.10.2.1       mrg 
    397  1.10.2.1       mrg 		key.qk_objtype = QUOTA_OBJTYPE_BLOCKS;
    398  1.10.2.1       mrg 		error = vfs_quotactl_put(mp, &key, &blocks);
    399  1.10.2.1       mrg 		if (error) {
    400  1.10.2.1       mrg 			break;
    401       1.7    bouyer 		}
    402  1.10.2.1       mrg 
    403  1.10.2.1       mrg 		key.qk_objtype = QUOTA_OBJTYPE_FILES;
    404  1.10.2.1       mrg 		error = vfs_quotactl_put(mp, &key, &files);
    405  1.10.2.1       mrg 		break;
    406       1.7    bouyer 
    407       1.7    bouyer 	case Q_SYNC:
    408       1.7    bouyer 		/*
    409       1.7    bouyer 		 * not supported but used only to see if quota is supported,
    410  1.10.2.1       mrg 		 * emulate with stat
    411  1.10.2.1       mrg 		 *
    412  1.10.2.1       mrg 		 * XXX should probably be supported
    413       1.7    bouyer 		 */
    414  1.10.2.1       mrg 		(void)idtype; /* not used */
    415  1.10.2.1       mrg 
    416  1.10.2.1       mrg 		error = vfs_quotactl_stat(mp, &qstat);
    417  1.10.2.1       mrg 		break;
    418       1.7    bouyer 
    419       1.7    bouyer 	case Q_SETUSE:
    420       1.7    bouyer 	default:
    421       1.7    bouyer 		error = EOPNOTSUPP;
    422  1.10.2.1       mrg 		break;
    423       1.7    bouyer 	}
    424  1.10.2.1       mrg 
    425       1.7    bouyer 	vrele(vp);
    426       1.7    bouyer 	return error;
    427       1.7    bouyer }
    428