mountpoint-util: introduce mount_propagation_flag_is_valid()
This commit is contained in:
@@ -598,3 +598,7 @@ int mount_propagation_flag_from_string(const char *name, unsigned long *ret) {
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool mount_propagation_flag_is_valid(unsigned long flag) {
|
||||
return IN_SET(flag, 0, MS_SHARED, MS_PRIVATE, MS_SLAVE);
|
||||
}
|
||||
|
||||
@@ -57,3 +57,4 @@ int mount_nofollow(const char *source, const char *target, const char *filesyste
|
||||
|
||||
const char *mount_propagation_flag_to_string(unsigned long flags);
|
||||
int mount_propagation_flag_from_string(const char *name, unsigned long *ret);
|
||||
bool mount_propagation_flag_is_valid(unsigned long flag);
|
||||
|
||||
Reference in New Issue
Block a user