diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-01-31 15:53:13 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-01-31 16:13:19 +0000 |
commit | 2bf5659e415f0a8a2601557cfdcc293c5cf88cf7 (patch) | |
tree | 78b2ce70e57ce4ffff8c6a0c42c01c5e04f1dddd | |
parent | Basic by title folder (diff) | |
download | mythfs-2bf5659e415f0a8a2601557cfdcc293c5cf88cf7.tar.bz2 mythfs-2bf5659e415f0a8a2601557cfdcc293c5cf88cf7.tar.xz mythfs-2bf5659e415f0a8a2601557cfdcc293c5cf88cf7.zip |
Implement statfs
-rw-r--r-- | mythfs/service/recordingsVolume.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/mythfs/service/recordingsVolume.cpp b/mythfs/service/recordingsVolume.cpp index a7d5830..18d837c 100644 --- a/mythfs/service/recordingsVolume.cpp +++ b/mythfs/service/recordingsVolume.cpp @@ -6,6 +6,8 @@ #include "inodes/allDirectory.h" #include "inodes/groupingByTitleDirectory.h" #include "openDirectory.h" +#include <sys/statvfs.h> +#include <typeConvert.h> namespace MythFS { RecordingsVolume::RecordingsVolume(DBPrx db) @@ -56,7 +58,15 @@ namespace MythFS { NetFS::VFS RecordingsVolume::statfs(const NetFS::ReqEnv &, const std::string &, const Ice::Current&) { - throw ::NetFS::SystemError(ENOSYS); + errno = 0; + struct statvfs s; + boost::filesystem::path p("/var/store/mythrecordings"); + if (::statvfs(p.c_str(), &s) != 0) { + throw NetFS::SystemError(errno); + } + NetFS::VFS t; + t << s; + return t; } Ice::Int RecordingsVolume::access(const NetFS::ReqEnv &, const std::string &, Ice::Int, const Ice::Current&) |