#include "afsincludes.h" /* Afs-based standard headers */
#include "afs/afs_stats.h" /* statistics stuff */
-int afs_statfs(register struct vfs *afsp, struct statfs *abp);
-int afs_sync(struct vfs *afsp);
-
-
struct vfsops Afs_vfsops = {
afs_mount,
afs_unmount,
int
afs_root(OSI_VFS_DECL(afsp), struct vnode **avpp)
{
- register afs_int32 code = 0;
+ afs_int32 code = 0;
struct vrequest treq;
- register struct vcache *tvp = 0;
+ struct vcache *tvp = 0;
OSI_VFS_CONVERT(afsp);
AFS_STATCNT(afs_root);
afs_globalVp = NULL;
}
- if (!(code = afs_InitReq(&treq, u.u_cred))
+ if (!(code = afs_InitReq(&treq, get_user_struct()->u_cred))
&& !(code = afs_CheckInit())) {
- tvp = afs_GetVCache(&afs_rootFid, &treq, NULL, NULL);
+ tvp = afs_GetVCache(&afs_rootFid, &treq);
/* we really want this to stay around */
if (tvp) {
afs_globalVp = tvp;
} else
- code = ENOENT;
+ code = EIO;
}
}
if (tvp) {
}
int
-afs_statfs(register struct vfs *afsp, struct statfs *abp)
+afs_statfs(struct vfs *afsp, struct statfs *abp)
{
AFS_STATCNT(afs_statfs);
abp->f_type = 0;
}
int
+afs_statvfs(struct vfs *afsp, struct statvfs *abp)
+{
+ AFS_STATCNT(afs_statfs);
+
+ abp->f_frsize = 1024;
+ abp->f_bsize = afsp->vfs_bsize;
+ abp->f_blocks = abp->f_bfree = abp->f_bavail = abp->f_files =
+ abp->f_favail = abp->f_ffree = AFS_VFS_FAKEFREE;
+
+#ifdef AFS_USR_AIX_ENV
+ abp->f_fsid.val[0] = AFS_VFSMAGIC;
+ abp->f_fsid.val[1] = AFS_VFSFSID;
+#else
+ abp->f_fsid = (AFS_VFSMAGIC << 16) | AFS_VFSFSID;
+#endif
+
+ return 0;
+}
+
+int
afs_mountroot(void)
{
AFS_STATCNT(afs_mountroot);