add minfreespace checks to policy ff's create and remove fwfs

fwfs is now covered by ff with the minfreespace and readonly checks
This commit is contained in:
Antonio SJ Musumeci
2016-02-29 18:06:59 -05:00
parent ccd3b5d2d0
commit 779143f4b6
9 changed files with 119 additions and 159 deletions
+18
View File
@@ -70,6 +70,24 @@ namespace fs
return exists(path,st);
}
bool
exists(const string &path,
bool &readonly,
size_t &spaceavail)
{
bool rv;
struct statvfs st;
rv = exists(path,st);
if(rv)
{
readonly = StatVFS::readonly(st);
spaceavail = StatVFS::spaceavail(st);
}
return rv;
}
bool
exists_on_rw_fs(const string &path,
struct statvfs &st)