]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/mount-util.h
mount-util: introduce remount_sysfs()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 17 Feb 2023 23:45:24 +0000 (08:45 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 23 Feb 2023 06:09:13 +0000 (15:09 +0900)
commitf63a2c4821566fb9c343391aa0186fd8b32e4d8e
tree3f35351b3eec128299b451ee6d23258882fcf742
parent24002121289698569bc28c0fe32dbb553a648545
mount-util: introduce remount_sysfs()

This is useful when creating a new network namespace. Unlike procfs,
we need to remount sysfs, otherwise properties of the network interfaces
in the main network namespace are still accessible through the old sysfs,
e.g. /sys/class/net/eth0. All sub-mounts previously mounted on the sysfs
are moved onto the new sysfs mount.

The function will be used in later commits.
src/shared/mount-util.c
src/shared/mount-util.h
src/test/test-mount-util.c