Source-Changes-HG archive

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

[src/trunk]: src/sys/compat Fix statfs->statvfs fallout.



details:   https://anonhg.NetBSD.org/src/rev/040dc865fd50
branches:  trunk
changeset: 565886:040dc865fd50
user:      hannken <hannken%NetBSD.org@localhost>
date:      Thu Apr 22 14:32:09 2004 +0000

description:
Fix statfs->statvfs fallout.

diffstat:

 sys/compat/netbsd32/netbsd32_fs.c |  23 +++++++++++------------
 sys/compat/sunos32/sunos32_misc.c |  18 +++++++++---------
 sys/compat/svr4_32/svr4_32_misc.c |  12 ++++++------
 3 files changed, 26 insertions(+), 27 deletions(-)

diffs (176 lines):

diff -r edf2e859fee2 -r 040dc865fd50 sys/compat/netbsd32/netbsd32_fs.c
--- a/sys/compat/netbsd32/netbsd32_fs.c Thu Apr 22 14:06:31 2004 +0000
+++ b/sys/compat/netbsd32/netbsd32_fs.c Thu Apr 22 14:32:09 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_fs.c,v 1.16 2004/04/21 01:05:36 christos Exp $        */
+/*     $NetBSD: netbsd32_fs.c,v 1.17 2004/04/22 14:32:09 hannken Exp $ */
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.16 2004/04/21 01:05:36 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.17 2004/04/22 14:32:09 hannken Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ktrace.h"
@@ -102,15 +102,14 @@
                            SCARG(uap, flags) != MNT_LAZY &&
                            (SCARG(uap, flags) == MNT_WAIT ||
                             SCARG(uap, flags) == 0) &&
-                           (error = VFS_STATFS(mp, sp, p)) != 0) {
+                           (error = VFS_STATVFS(mp, sp, p)) != 0) {
                                simple_lock(&mountlist_slock);
                                nmp = mp->mnt_list.cqe_next;
                                vfs_unbusy(mp);
                                continue;
                        }
-                       sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
-                       sp->f_oflags = sp->f_flags & 0xffff;
-                       netbsd32_from_statfs(sp, &sb32);
+                       sp->f_flag = mp->mnt_flag & MNT_VISFLAGMASK;
+                       netbsd32_from_statvfs(sp, &sb32);
                        error = copyout(&sb32, sfsp, sizeof(sb32));
                        if (error) {
                                vfs_unbusy(mp);
@@ -466,10 +465,10 @@
        mp = nd.ni_vp->v_mount;
        sp = &mp->mnt_stat;
        vrele(nd.ni_vp);
-       if ((error = VFS_STATFS(mp, sp, p)) != 0)
+       if ((error = VFS_STATVFS(mp, sp, p)) != 0)
                return (error);
-       sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
-       netbsd32_from_statfs(sp, &s32);
+       sp->f_flag = mp->mnt_flag & MNT_VISFLAGMASK;
+       netbsd32_from_statvfs(sp, &s32);
        return (copyout(&s32, (caddr_t)NETBSD32PTR64(SCARG(uap, buf)),
            sizeof(s32)));
 }
@@ -496,10 +495,10 @@
                return (error);
        mp = ((struct vnode *)fp->f_data)->v_mount;
        sp = &mp->mnt_stat;
-       if ((error = VFS_STATFS(mp, sp, p)) != 0)
+       if ((error = VFS_STATVFS(mp, sp, p)) != 0)
                goto out;
-       sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
-       netbsd32_from_statfs(sp, &s32);
+       sp->f_flag = mp->mnt_flag & MNT_VISFLAGMASK;
+       netbsd32_from_statvfs(sp, &s32);
        error = copyout(&s32, (caddr_t)NETBSD32PTR64(SCARG(uap, buf)),
            sizeof(s32));
  out:
diff -r edf2e859fee2 -r 040dc865fd50 sys/compat/sunos32/sunos32_misc.c
--- a/sys/compat/sunos32/sunos32_misc.c Thu Apr 22 14:06:31 2004 +0000
+++ b/sys/compat/sunos32/sunos32_misc.c Thu Apr 22 14:32:09 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sunos32_misc.c,v 1.25 2004/04/21 01:05:37 christos Exp $       */
+/*     $NetBSD: sunos32_misc.c,v 1.26 2004/04/22 14:32:09 hannken Exp $        */
 /* from :NetBSD: sunos_misc.c,v 1.107 2000/12/01 19:25:10 jdolecek Exp */
 
 /*
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.25 2004/04/21 01:05:37 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.26 2004/04/22 14:32:09 hannken Exp $");
 
 #define COMPAT_SUNOS 1
 
@@ -143,7 +143,7 @@
 static void sunos32_sigvec_to_sigaction(const struct netbsd32_sigvec *, struct sigaction *);
 static void sunos32_sigvec_from_sigaction(struct netbsd32_sigvec *, const struct sigaction *);
 
-static int sunstatfs __P((struct statfs *, caddr_t));
+static int sunstatfs __P((struct statvfs *, caddr_t));
 
 static void
 sunos32_sigvec_to_sigaction(sv, sa)
@@ -1264,7 +1264,7 @@
        } */ *uap = v;
        struct proc *p = l->l_proc;
        struct mount *mp;
-       struct statfs *sp;
+       struct statvfs *sp;
        int error;
        struct nameidata nd;
 
@@ -1277,9 +1277,9 @@
        mp = nd.ni_vp->v_mount;
        sp = &mp->mnt_stat;
        vrele(nd.ni_vp);
-       if ((error = VFS_STATFS(mp, sp, p)) != 0)
+       if ((error = VFS_STATVFS(mp, sp, p)) != 0)
                return (error);
-       sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
+       sp->f_flag = mp->mnt_flag & MNT_VISFLAGMASK;
        return sunstatfs(sp, (caddr_t)(u_long)SCARG(uap, buf));
 }
 
@@ -1296,7 +1296,7 @@
        struct proc *p = l->l_proc;
        struct file *fp;
        struct mount *mp;
-       struct statfs *sp;
+       struct statvfs *sp;
        int error;
 
        /* getvnode() will use the descriptor for us */
@@ -1304,9 +1304,9 @@
                return (error);
        mp = ((struct vnode *)fp->f_data)->v_mount;
        sp = &mp->mnt_stat;
-       if ((error = VFS_STATFS(mp, sp, p)) != 0)
+       if ((error = VFS_STATVFS(mp, sp, p)) != 0)
                goto out;
-       sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
+       sp->f_flag = mp->mnt_flag & MNT_VISFLAGMASK;
        error = sunstatfs(sp, (caddr_t)(u_long)SCARG(uap, buf));
  out:
        FILE_UNUSE(fp, p);
diff -r edf2e859fee2 -r 040dc865fd50 sys/compat/svr4_32/svr4_32_misc.c
--- a/sys/compat/svr4_32/svr4_32_misc.c Thu Apr 22 14:06:31 2004 +0000
+++ b/sys/compat/svr4_32/svr4_32_misc.c Thu Apr 22 14:32:09 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: svr4_32_misc.c,v 1.27 2004/04/22 14:06:31 christos Exp $        */
+/*     $NetBSD: svr4_32_misc.c,v 1.28 2004/04/22 14:32:09 hannken Exp $         */
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -44,7 +44,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.27 2004/04/22 14:06:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.28 2004/04/22 14:32:09 hannken Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1255,9 +1255,9 @@
        sfs->f_fsid = bfs->f_fsidx.__fsid_val[0];
        memcpy(sfs->f_basetype, bfs->f_fstypename, sizeof(sfs->f_basetype));
        sfs->f_flag = 0;
-       if (bfs->f_flags & MNT_RDONLY)
+       if (bfs->f_flag & MNT_RDONLY)
                sfs->f_flag |= SVR4_ST_RDONLY;
-       if (bfs->f_flags & MNT_NOSUID)
+       if (bfs->f_flag & MNT_NOSUID)
                sfs->f_flag |= SVR4_ST_NOSUID;
        sfs->f_namemax = MAXNAMLEN;
        memcpy(sfs->f_fstr, bfs->f_fstypename, sizeof(sfs->f_fstr)); /* XXX */
@@ -1281,9 +1281,9 @@
        sfs->f_fsid = bfs->f_fsidx.__fsid_val[0];
        memcpy(sfs->f_basetype, bfs->f_fstypename, sizeof(sfs->f_basetype));
        sfs->f_flag = 0;
-       if (bfs->f_flags & MNT_RDONLY)
+       if (bfs->f_flag & MNT_RDONLY)
                sfs->f_flag |= SVR4_ST_RDONLY;
-       if (bfs->f_flags & MNT_NOSUID)
+       if (bfs->f_flag & MNT_NOSUID)
                sfs->f_flag |= SVR4_ST_NOSUID;
        sfs->f_namemax = MAXNAMLEN;
        memcpy(sfs->f_fstr, bfs->f_fstypename, sizeof(sfs->f_fstr)); /* XXX */



Home | Main Index | Thread Index | Old Index