mirror of
https://github.com/ksherlock/profuse.git
synced 2026-04-21 05:16:58 +00:00
git-svn-id: https://profuse.googlecode.com/svn/branches/profuse_interim@366 aa027e90-d47c-11dd-86d7-074df07e0730
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/statvfs.h>
|
||||
|
||||
using std::vector;
|
||||
|
||||
@@ -217,3 +219,34 @@ void prodos_lookup(fuse_req_t req, fuse_ino_t parent, const char *name)
|
||||
fuse_reply_entry(req, &entry);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void prodos_statfs(fuse_req_t req, fuse_ino_t ino)
|
||||
{
|
||||
struct statvfs vst;
|
||||
|
||||
VolumeEntry volume;
|
||||
|
||||
|
||||
disk->ReadVolume(&volume, NULL);
|
||||
|
||||
// returns statvfs for the mount path or any file in the fs
|
||||
// therefore, ignore ino.
|
||||
std::memset(&vst, 0, sizeof(vst));
|
||||
|
||||
vst.f_bsize = 512; // fs block size
|
||||
vst.f_frsize = 512; // fundamental fs block size
|
||||
vst.f_blocks = volume.total_blocks;
|
||||
vst.f_bfree = 0; // free blocks
|
||||
vst.f_bavail = 0; // free blocks (non-root)
|
||||
vst.f_files = 0; // ?
|
||||
vst.f_ffree = -1; // free inodes.
|
||||
vst.f_favail = -1; // free inodes (non-root)
|
||||
vst.f_fsid = 0; // file system id?
|
||||
vst.f_flag = ST_RDONLY | ST_NOSUID;
|
||||
vst.f_namemax = 15;
|
||||
|
||||
fuse_reply_statfs(req, &vst);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user