Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/yamt-uio_vmspace]: src/sys convert smbfs.



details:   https://anonhg.NetBSD.org/src/rev/b01a8497c410
branches:  yamt-uio_vmspace
changeset: 586702:b01a8497c410
user:      yamt <yamt%NetBSD.org@localhost>
date:      Sun Jan 15 10:59:43 2006 +0000

description:
convert smbfs.

diffstat:

 sys/fs/smbfs/smbfs_io.c  |   6 +++---
 sys/netsmb/smb_dev.c     |   7 +++----
 sys/netsmb/smb_trantcp.c |   9 ++++-----
 sys/netsmb/subr_mchain.c |  10 ++++++----
 4 files changed, 16 insertions(+), 16 deletions(-)

diffs (141 lines):

diff -r 54657f210cda -r b01a8497c410 sys/fs/smbfs/smbfs_io.c
--- a/sys/fs/smbfs/smbfs_io.c   Sun Jan 15 10:44:52 2006 +0000
+++ b/sys/fs/smbfs/smbfs_io.c   Sun Jan 15 10:59:43 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: smbfs_io.c,v 1.20.2.1 2006/01/15 10:02:56 yamt Exp $   */
+/*     $NetBSD: smbfs_io.c,v 1.20.2.2 2006/01/15 10:59:43 yamt Exp $   */
 
 /*
  * Copyright (c) 2000-2001, Boris Popov
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: smbfs_io.c,v 1.20.2.1 2006/01/15 10:02:56 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smbfs_io.c,v 1.20.2.2 2006/01/15 10:59:43 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -311,7 +311,7 @@
 
        uiop->uio_iov = &io;
        uiop->uio_iovcnt = 1;
-       uiop->uio_segflg = UIO_SYSSPACE;
+       UIO_SETUP_SYSSPACE(uiop);
 
        smb_makescred(&scred, l, cr);
 
diff -r 54657f210cda -r b01a8497c410 sys/netsmb/smb_dev.c
--- a/sys/netsmb/smb_dev.c      Sun Jan 15 10:44:52 2006 +0000
+++ b/sys/netsmb/smb_dev.c      Sun Jan 15 10:59:43 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: smb_dev.c,v 1.21 2005/12/11 12:25:16 christos Exp $    */
+/*     $NetBSD: smb_dev.c,v 1.21.2.1 2006/01/15 10:59:43 yamt Exp $    */
 
 /*
  * Copyright (c) 2000-2001 Boris Popov
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: smb_dev.c,v 1.21 2005/12/11 12:25:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smb_dev.c,v 1.21.2.1 2006/01/15 10:59:43 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -389,9 +389,8 @@
                auio.uio_iovcnt = 1;
                auio.uio_offset = rwrq->ioc_offset;
                auio.uio_resid = rwrq->ioc_cnt;
-               auio.uio_segflg = UIO_USERSPACE;
                auio.uio_rw = (cmd == SMBIOC_READ) ? UIO_READ : UIO_WRITE;
-               auio.uio_lwp = l;
+               auio.uio_vmspace = l->l_proc->p_vmspace;
                if (cmd == SMBIOC_READ)
                        error = smb_read(ssp, rwrq->ioc_fh, &auio, &scred);
                else
diff -r 54657f210cda -r b01a8497c410 sys/netsmb/smb_trantcp.c
--- a/sys/netsmb/smb_trantcp.c  Sun Jan 15 10:44:52 2006 +0000
+++ b/sys/netsmb/smb_trantcp.c  Sun Jan 15 10:59:43 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: smb_trantcp.c,v 1.20 2005/12/24 20:45:09 perry Exp $   */
+/*     $NetBSD: smb_trantcp.c,v 1.20.2.1 2006/01/15 10:59:43 yamt Exp $        */
 
 /*
  * Copyright (c) 2000-2001 Boris Popov
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: smb_trantcp.c,v 1.20 2005/12/24 20:45:09 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smb_trantcp.c,v 1.20.2.1 2006/01/15 10:59:43 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -406,11 +406,10 @@
        aio.iov_len = sizeof(len);
        auio.uio_iov = &aio;
        auio.uio_iovcnt = 1;
-       auio.uio_segflg = UIO_SYSSPACE;
        auio.uio_rw = UIO_READ;
        auio.uio_offset = 0;
        auio.uio_resid = sizeof(len);
-       auio.uio_lwp = NULL;
+       UIO_SETUP_SYSSPACE(&auio);
 #ifndef __NetBSD__
        error = so->so_proto->pr_usrreqs->pru_soreceive
            (so, (struct sockaddr **)NULL, &auio,
@@ -493,7 +492,7 @@
                        rcvflg = MSG_WAITALL;
                        bzero(&auio, sizeof(auio));
                        auio.uio_resid = min(resid, NB_SORECEIVE_CHUNK);
-                       auio.uio_lwp = l;
+                       /* not need to setup uio_vmspace */
                        resid -= auio.uio_resid;
                        /*
                         * Spin until we have collected everything in
diff -r 54657f210cda -r b01a8497c410 sys/netsmb/subr_mchain.c
--- a/sys/netsmb/subr_mchain.c  Sun Jan 15 10:44:52 2006 +0000
+++ b/sys/netsmb/subr_mchain.c  Sun Jan 15 10:59:43 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_mchain.c,v 1.12 2005/12/11 12:25:16 christos Exp $        */
+/*     $NetBSD: subr_mchain.c,v 1.12.2.1 2006/01/15 10:59:43 yamt Exp $        */
 
 /*
  * Copyright (c) 2000, 2001 Boris Popov
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_mchain.c,v 1.12 2005/12/11 12:25:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_mchain.c,v 1.12.2.1 2006/01/15 10:59:43 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -43,6 +43,8 @@
 #include <sys/mbuf.h>
 #include <sys/uio.h>
 
+#include <uvm/uvm_extern.h>
+
 #include <netsmb/mchain.h>
 
 #define MBERROR(format, args...) printf("%s(%d): "format, __func__ , \
@@ -329,7 +331,7 @@
        long left;
        int mtype, error;
 
-       mtype = (uiop->uio_segflg == UIO_SYSSPACE) ? MB_MSYSTEM : MB_MUSER;
+       mtype = VMSPACE_IS_KERNEL_P(uiop->uio_vmspace) ? MB_MSYSTEM : MB_MUSER;
 
        while (size > 0 && uiop->uio_resid) {
                if (uiop->uio_iovcnt <= 0 || uiop->uio_iov == NULL)
@@ -582,7 +584,7 @@
        long left;
        int mtype, error;
 
-       mtype = (uiop->uio_segflg == UIO_SYSSPACE) ? MB_MSYSTEM : MB_MUSER;
+       mtype = VMSPACE_IS_KERNEL_P(uiop->uio_vmspace) ? MB_MSYSTEM : MB_MUSER;
        while (size > 0 && uiop->uio_resid) {
                if (uiop->uio_iovcnt <= 0 || uiop->uio_iov == NULL)
                        return EFBIG;



Home | Main Index | Thread Index | Old Index