diff options
Diffstat (limited to 'mythfs/service/recordingsVolume.cpp')
-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&) |