diff options
author | Helmut Grohne <helmut@subdivi.de> | 2024-02-15 22:31:51 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2024-02-15 22:50:26 +0100 |
commit | d8ecc510108426fba8f9a53e0d5fa54d5942e75f (patch) | |
tree | d37c1fe311be473745df1717bc213afb976133eb /examples | |
parent | 72ff759384538d412b5114d72b3115b730c06406 (diff) | |
download | python-linuxnamespaces-d8ecc510108426fba8f9a53e0d5fa54d5942e75f.tar.gz |
MountFlags: support conversion to and from a textual representation
The textual representation matches util-linux. Not all flag values can
be represented textually.
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/cgroup.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/examples/cgroup.py b/examples/cgroup.py index 06eb3b3..0c52efb 100755 --- a/examples/cgroup.py +++ b/examples/cgroup.py @@ -123,11 +123,7 @@ def main() -> None: "tmpfs", "/sys", "tmpfs", - linuxnamespaces.MountFlags.REMOUNT - | linuxnamespaces.MountFlags.RDONLY - | linuxnamespaces.MountFlags.NOEXEC - | linuxnamespaces.MountFlags.NOSUID - | linuxnamespaces.MountFlags.NODEV, + linuxnamespaces.MountFlags.fromstr("remount,ro,noexec,nosuid,nodev"), "mode=0755", ) linuxnamespaces.move_mount(cgroupfd, "/sys/fs/cgroup") |