From 7d6895d7ca0fe472c64964793b12f8ea536decde Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Fri, 27 Jun 2025 21:04:36 +0200 Subject: mount syscall now accepts options as dict --- examples/chrootfuse.py | 14 +++++++------- examples/unschroot.py | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'examples') diff --git a/examples/chrootfuse.py b/examples/chrootfuse.py index 7e77384..7e79a2e 100755 --- a/examples/chrootfuse.py +++ b/examples/chrootfuse.py @@ -74,13 +74,13 @@ def main() -> None: linuxnamespaces.MountFlags.RDONLY if readonly else linuxnamespaces.MountFlags.NONE, - [ - "fd=%d" % fusefd, - "rootmode=040755", - "user_id=0", - "group_id=0", - "allow_other", - ], + { + "fd": fusefd, + "rootmode": "040755", + "user_id": 0, + "group_id": 0, + "allow_other": None, + }, ) os.chdir("/mnt") linuxnamespaces.bind_mount("/proc", "proc", recursive=True) diff --git a/examples/unschroot.py b/examples/unschroot.py index 7da6e9a..43c4ea3 100755 --- a/examples/unschroot.py +++ b/examples/unschroot.py @@ -242,12 +242,12 @@ class DirectorySessionChroot(SessionChroot): "overlay", mnt, "overlay", - data=[ - "lowerdir=" + str(self.source.path), - "upperdir=" + str(self.path / "upper"), - "workdir=" + str(self.path / "work"), - "userxattr", - ], + data={ + "lowerdir": str(self.source.path), + "upperdir": str(self.path / "upper"), + "workdir": str(self.path / "work"), + "userxattr": None, + }, ) return pathlib.Path(mnt) -- cgit v1.2.3