From b88157559d3ff736a483fba61074ad05e1bde640 Mon Sep 17 00:00:00 2001 From: Boris Popov Date: Fri, 26 Apr 2002 03:49:02 +0000 Subject: [PATCH] UIO_NOCOPY is not supported for now, so refuse read opeartion if this flag is set. The full emulation of bio are on its way... --- sys/fs/smbfs/smbfs_io.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/fs/smbfs/smbfs_io.c b/sys/fs/smbfs/smbfs_io.c index 7574af512d5a..6a2877b7168f 100644 --- a/sys/fs/smbfs/smbfs_io.c +++ b/sys/fs/smbfs/smbfs_io.c @@ -185,6 +185,12 @@ smbfs_readvnode(struct vnode *vp, struct uio *uiop, struct ucred *cred) struct smb_cred scred; int error, lks; + /* + * Protect against method which is not supported for now + */ + if (uiop->uio_segflg == UIO_NOCOPY) + return EOPNOTSUPP; + if (vp->v_type != VREG && vp->v_type != VDIR) { SMBFSERR("vn types other than VREG or VDIR are unsupported !\n"); return EIO;