add hugetlb functions

Signed-off-by: bin liu <bin@hyper.sh>
This commit is contained in:
bin liu
2020-08-25 10:51:49 +08:00
parent 6b1b26b1fe
commit 9d70467327
4 changed files with 177 additions and 5 deletions

View File

@@ -27,6 +27,8 @@ pub enum ErrorKind {
/// This crate checks against this and operations will fail with this error.
InvalidPath,
InvalidBytesSize,
/// An unknown error has occured.
Other,
}
@@ -45,6 +47,7 @@ impl fmt::Display for Error {
ErrorKind::ParseError => "unable to parse control group file",
ErrorKind::InvalidOperation => "the requested operation is invalid",
ErrorKind::InvalidPath => "the given path is invalid",
ErrorKind::InvalidBytesSize => "invalid bytes size",
ErrorKind::Other => "an unknown error",
};