Convert EROFS error

This commit is contained in:
Kaiwen Xu 2019-09-01 19:50:44 -07:00 committed by Ivan
parent 14aa3b3360
commit 68071ddf83
2 changed files with 3 additions and 0 deletions

View File

@ -153,6 +153,7 @@ static fs::error to_error(int e)
case EINVAL: return fs::error::inval;
case EACCES: return fs::error::acces;
case ENOTEMPTY: return fs::error::notempty;
case EROFS: return fs::error::readonly;
default: fmt::throw_exception("Unknown system error: %d.", e);
}
}
@ -1751,6 +1752,7 @@ void fmt_class_string<fs::error>::format(std::string& out, u64 arg)
case fs::error::exist: return "Already exists";
case fs::error::acces: return "Access violation";
case fs::error::notempty: return "Not empty";
case fs::error::readonly: return "Read only";
}
return unknown;

View File

@ -518,6 +518,7 @@ namespace fs
exist,
acces,
notempty,
readonly,
};
// Error code returned