mount: support remount

remount is handled by libc, not the kernel mount procedure, this fixes
remounts. Also sorted the list of flags.

Signed-off-by: Daniel Hill <daniel@gluo.nz>
This commit is contained in:
Daniel Hill 2023-02-11 13:45:23 +13:00
parent 284c1f5148
commit 157ea20eb2

View File

@ -128,9 +128,10 @@ fn parse_mount_options(options: impl AsRef<str>) -> (Option<String>, u64) {
"nodiratime" => Left(libc::MS_NODIRATIME),
"noexec" => Left(libc::MS_NOEXEC),
"nosuid" => Left(libc::MS_NOSUID),
"relatime" => Left(libc::MS_RELATIME),
"remount" => Left(libc::MS_REMOUNT),
"ro" => Left(libc::MS_RDONLY),
"rw" => Left(0),
"relatime" => Left(libc::MS_RELATIME),
"strictatime" => Left(libc::MS_STRICTATIME),
"sync" => Left(libc::MS_SYNCHRONOUS),
"" => Left(0),