Fix some statfs->statvfs fallout. Compile tested only...

This commit is contained in:
simonb 2004-04-21 05:20:27 +00:00
parent e3b919c754
commit 0495170a7a
2 changed files with 14 additions and 14 deletions

View File

@ -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 * Copyright (c) 1995, 1997 Jonathan Stone
@ -33,7 +33,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__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 <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -151,7 +151,7 @@ struct ultrix_getmnt_args {
static void 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 * 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 static void
make_ultrix_mntent(sp, tem) make_ultrix_mntent(sp, tem)
struct statfs *sp; struct statvfs *sp;
struct ultrix_fs_data *tem; struct ultrix_fs_data *tem;
{ {
memset(tem, 0, sizeof (*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_mtsize = sp->f_bsize; /* XXX max transfer size */
tem->ufsd_otsize = sp->f_iosize; tem->ufsd_otsize = sp->f_iosize;
tem->ufsd_bsize = sp->f_bsize; tem->ufsd_bsize = sp->f_bsize;
@ -212,7 +212,7 @@ ultrix_sys_getmnt(l, v, retval)
struct ultrix_sys_getmnt_args *uap = v; struct ultrix_sys_getmnt_args *uap = v;
struct proc *p = l->l_proc; struct proc *p = l->l_proc;
struct mount *mp, *nmp; struct mount *mp, *nmp;
struct statfs *sp; struct statvfs *sp;
struct ultrix_fs_data *sfsp; struct ultrix_fs_data *sfsp;
char *path; char *path;
int mntflags; int mntflags;
@ -274,13 +274,13 @@ ultrix_sys_getmnt(l, v, retval)
* If requested, refresh the fsstat cache. * If requested, refresh the fsstat cache.
*/ */
if (mntflags != MNT_WAIT && if (mntflags != MNT_WAIT &&
(error = VFS_STATFS(mp, sp, p)) != 0) (error = VFS_STATVFS(mp, sp, p)) != 0)
continue; continue;
/* /*
* XXX what does this do? -- cgd * 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 || if (path == NULL ||
strcmp(path, sp->f_mntonname) == 0) { strcmp(path, sp->f_mntonname) == 0) {
make_ultrix_mntent(sp, &tem); make_ultrix_mntent(sp, &tem);

View File

@ -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 * Copyright (c) 1992, 1993
@ -59,7 +59,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__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 <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -268,7 +268,7 @@ ultrixstatfs(sp, buf)
ssfs.f_bavail = sp->f_bavail; ssfs.f_bavail = sp->f_bavail;
ssfs.f_files = sp->f_files; ssfs.f_files = sp->f_files;
ssfs.f_ffree = sp->f_ffree; 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); return copyout((caddr_t)&ssfs, buf, sizeof ssfs);
} }
@ -298,8 +298,8 @@ ultrix_sys_statfs(l, v, retval)
vrele(nd.ni_vp); vrele(nd.ni_vp);
if ((error = VFS_STATVFS(mp, sp, p)) != 0) if ((error = VFS_STATVFS(mp, sp, p)) != 0)
return (error); return (error);
sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK; sp->f_flag = mp->mnt_flag & MNT_VISFLAGMASK;
return ultrixstatvfs(sp, (caddr_t)SCARG(uap, buf)); return ultrixstatfs(sp, (caddr_t)SCARG(uap, buf));
} }
/* /*
@ -327,7 +327,7 @@ ultrix_sys_fstatfs(l, v, retval)
sp = &mp->mnt_stat; sp = &mp->mnt_stat;
if ((error = VFS_STATVFS(mp, sp, p)) != 0) if ((error = VFS_STATVFS(mp, sp, p)) != 0)
goto out; 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)); error = ultrixstatfs(sp, (caddr_t)SCARG(uap, buf));
out: out:
FILE_UNUSE(fp, p); FILE_UNUSE(fp, p);