mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
UKERNEL: add uafs_statvfs
Change-Id: Iedd7882f4a57cd89d145f1c61c5f85181187db03 Reviewed-on: http://gerrit.openafs.org/1716 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
f7b1923642
commit
b822971a3e
@ -1919,6 +1919,25 @@ uafs_Init(char *rn, char *mountDirParam, char *confDirParam,
|
||||
return;
|
||||
}
|
||||
|
||||
int
|
||||
uafs_statvfs(struct statvfs *buf)
|
||||
{
|
||||
int rc;
|
||||
|
||||
AFS_GLOCK();
|
||||
|
||||
rc = afs_statvfs(&afs_RootVfs, buf);
|
||||
|
||||
AFS_GUNLOCK();
|
||||
|
||||
if (rc) {
|
||||
errno = rc;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
uafs_Shutdown(void)
|
||||
{
|
||||
|
@ -151,5 +151,6 @@ extern int uafs_RPCStatsEnablePeer(void);
|
||||
extern int uafs_RPCStatsDisablePeer(void);
|
||||
extern int uafs_IsRoot(char *path);
|
||||
extern int uafs_statmountpoint_r(char *path);
|
||||
extern int uafs_statvfs(struct statvfs *buf);
|
||||
|
||||
#endif /* __AFS_USROPS_H__ */
|
||||
|
@ -119,6 +119,21 @@ afs_statfs(register struct vfs *afsp, struct statfs *abp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
afs_statvfs(struct vfs *afsp, struct statvfs *abp)
|
||||
{
|
||||
AFS_STATCNT(afs_statfs);
|
||||
|
||||
abp->f_frsize = 1024;
|
||||
abp->f_favail = 9000000;
|
||||
abp->f_bsize = afsp->vfs_bsize;
|
||||
abp->f_blocks = abp->f_bfree = abp->f_bavail = abp->f_files =
|
||||
abp->f_ffree = 9000000;
|
||||
abp->f_fsid = (AFS_VFSMAGIC << 16) || AFS_VFSFSID;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
afs_mountroot(void)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user