systemd-mount: allow to specify an arbitrary string for arg_mount_what when vfs is used

Fixes #6591.
This commit is contained in:
Yu Watanabe
2017-09-04 10:55:51 +09:00
parent 4185da7c4d
commit e2be442e79
3 changed files with 34 additions and 1 deletions
+26
View File
@@ -552,6 +552,32 @@ bool fstype_is_network(const char *fstype) {
return nulstr_contains(table, fstype);
}
bool fstype_is_api_vfs(const char *fstype) {
static const char table[] =
"autofs\0"
"bpf\0"
"cgroup\0"
"cgroup2\0"
"configfs\0"
"cpuset\0"
"debugfs\0"
"devpts\0"
"devtmpfs\0"
"efivarfs\0"
"hugetlbfs\0"
"mqueue\0"
"proc\0"
"pstore\0"
"ramfs\0"
"securityfs\0"
"sysfs\0"
"tmpfs\0"
"tracefs\0"
;
return nulstr_contains(table, fstype);
}
int repeat_unmount(const char *path, int flags) {
bool done = false;
+1
View File
@@ -44,6 +44,7 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(FILE*, endmntent);
#define _cleanup_endmntent_ _cleanup_(endmntentp)
bool fstype_is_network(const char *fstype);
bool fstype_is_api_vfs(const char *fstype);
union file_handle_union {
struct file_handle handle;