From 0495170a7a88b165bb003bc9db90d8518c07c497 Mon Sep 17 00:00:00 2001 From: simonb Date: Wed, 21 Apr 2004 05:20:27 +0000 Subject: [PATCH] Fix some statfs->statvfs fallout. Compile tested only... --- sys/compat/ultrix/ultrix_fs.c | 16 ++++++++-------- sys/compat/ultrix/ultrix_pathname.c | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sys/compat/ultrix/ultrix_fs.c b/sys/compat/ultrix/ultrix_fs.c index ba445390da79..9aadebd2498c 100644 --- a/sys/compat/ultrix/ultrix_fs.c +++ b/sys/compat/ultrix/ultrix_fs.c @@ -1,4 +1,4 @@ -/* $NetBSD: ultrix_fs.c,v 1.27 2003/06/29 22:29:53 fvdl Exp $ */ +/* $NetBSD: ultrix_fs.c,v 1.28 2004/04/21 05:20:27 simonb Exp $ */ /* * Copyright (c) 1995, 1997 Jonathan Stone @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ultrix_fs.c,v 1.27 2003/06/29 22:29:53 fvdl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ultrix_fs.c,v 1.28 2004/04/21 05:20:27 simonb Exp $"); #include #include @@ -151,7 +151,7 @@ struct ultrix_getmnt_args { static void -make_ultrix_mntent __P(( struct statfs *sp, struct ultrix_fs_data *tem)); +make_ultrix_mntent __P(( struct statvfs *sp, struct ultrix_fs_data *tem)); /* * Construct an Ultrix getmnt() ultrix_fs_data from the native NetBSD @@ -159,13 +159,13 @@ make_ultrix_mntent __P(( struct statfs *sp, struct ultrix_fs_data *tem)); */ static void make_ultrix_mntent(sp, tem) - struct statfs *sp; + struct statvfs *sp; struct ultrix_fs_data *tem; { memset(tem, 0, sizeof (*tem)); - tem->ufsd_flags = sp->f_flags; /* XXX translate */ + tem->ufsd_flags = sp->f_flag; /* XXX translate */ tem->ufsd_mtsize = sp->f_bsize; /* XXX max transfer size */ tem->ufsd_otsize = sp->f_iosize; tem->ufsd_bsize = sp->f_bsize; @@ -212,7 +212,7 @@ ultrix_sys_getmnt(l, v, retval) struct ultrix_sys_getmnt_args *uap = v; struct proc *p = l->l_proc; struct mount *mp, *nmp; - struct statfs *sp; + struct statvfs *sp; struct ultrix_fs_data *sfsp; char *path; int mntflags; @@ -274,13 +274,13 @@ ultrix_sys_getmnt(l, v, retval) * If requested, refresh the fsstat cache. */ if (mntflags != MNT_WAIT && - (error = VFS_STATFS(mp, sp, p)) != 0) + (error = VFS_STATVFS(mp, sp, p)) != 0) continue; /* * XXX what does this do? -- cgd */ - sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK; + sp->f_flag = mp->mnt_flag & MNT_VISFLAGMASK; if (path == NULL || strcmp(path, sp->f_mntonname) == 0) { make_ultrix_mntent(sp, &tem); diff --git a/sys/compat/ultrix/ultrix_pathname.c b/sys/compat/ultrix/ultrix_pathname.c index 414bfc14f6fd..e8cbbcba581e 100644 --- a/sys/compat/ultrix/ultrix_pathname.c +++ b/sys/compat/ultrix/ultrix_pathname.c @@ -1,4 +1,4 @@ -/* $NetBSD: ultrix_pathname.c,v 1.20 2004/04/21 01:05:37 christos Exp $ */ +/* $NetBSD: ultrix_pathname.c,v 1.21 2004/04/21 05:20:27 simonb Exp $ */ /* * Copyright (c) 1992, 1993 @@ -59,7 +59,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ultrix_pathname.c,v 1.20 2004/04/21 01:05:37 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ultrix_pathname.c,v 1.21 2004/04/21 05:20:27 simonb Exp $"); #include #include @@ -268,7 +268,7 @@ ultrixstatfs(sp, buf) ssfs.f_bavail = sp->f_bavail; ssfs.f_files = sp->f_files; ssfs.f_ffree = sp->f_ffree; - ssfs.f_fsid = sp->f_fsidx.__fsid_val[0]; + ssfs.f_fsid = sp->f_fsidx; return copyout((caddr_t)&ssfs, buf, sizeof ssfs); } @@ -298,8 +298,8 @@ ultrix_sys_statfs(l, v, retval) vrele(nd.ni_vp); if ((error = VFS_STATVFS(mp, sp, p)) != 0) return (error); - sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK; - return ultrixstatvfs(sp, (caddr_t)SCARG(uap, buf)); + sp->f_flag = mp->mnt_flag & MNT_VISFLAGMASK; + return ultrixstatfs(sp, (caddr_t)SCARG(uap, buf)); } /* @@ -327,7 +327,7 @@ ultrix_sys_fstatfs(l, v, retval) sp = &mp->mnt_stat; 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 = ultrixstatfs(sp, (caddr_t)SCARG(uap, buf)); out: FILE_UNUSE(fp, p);