From f99e5010670e13549dfb593528b74b039073367d Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 31 Jan 2016 15:53:13 +0000 Subject: Implement statfs --- mythfs/service/recordingsVolume.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 +#include 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&) -- cgit v1.2.3