mountpoint-util: add small helper that checks if a path is below the API VFS hierarchies
This commit is contained in:
@@ -785,3 +785,10 @@ int mount_option_supported(const char *fstype, const char *key, const char *valu
|
||||
|
||||
return true; /* works! */
|
||||
}
|
||||
|
||||
bool path_below_api_vfs(const char *p) {
|
||||
assert(p);
|
||||
|
||||
/* API VFS are either directly mounted on any of these three paths, or below it. */
|
||||
return PATH_STARTSWITH_SET(p, "/dev", "/sys", "/proc");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user