[ad_1]
I have a filesystem that should be mounted with prjquota
flag. But due to human factor someone might forget to do that, so i need to check that quota was enbled on application startup. I thought that it’s possible to check using quotactl with Q_GETFMT
as subcmd arg. But it always sets flag to 0. What am i doing wrong?
I’ve tried device
as an absolute path to file under XFS and as path to actual device. But no results.
bool isQuotaEnabled(const std::filesystem::path &device)
{
uint32_t buff{};
quotactl(QCMD(Q_GETFMT, PRJQUOTA), device.c_str(), 0, (caddr_t)&buff);
return buff;
}
[ad_2]