nsflags: drop namespace_flag_to_string_many_with_check()
We always ignore the unused bits. So, it is not necessary to check them.
This commit is contained in:
parent
4b4ee0f781
commit
a3f8b0ef45
|
@ -1207,7 +1207,7 @@ static BUS_DEFINE_SET_TRANSIENT_PARSE_PTR(personality, unsigned long, parse_pers
|
|||
static BUS_DEFINE_SET_TRANSIENT_TO_STRING_ALLOC(secure_bits, "i", int32_t, int, "%" PRIi32, secure_bits_to_string_alloc_with_check);
|
||||
static BUS_DEFINE_SET_TRANSIENT_TO_STRING_ALLOC(capability, "t", uint64_t, uint64_t, "%" PRIu64, capability_set_to_string_alloc);
|
||||
static BUS_DEFINE_SET_TRANSIENT_TO_STRING_ALLOC(sched_policy, "i", int32_t, int, "%" PRIi32, sched_policy_to_string_alloc_with_check);
|
||||
static BUS_DEFINE_SET_TRANSIENT_TO_STRING_ALLOC(namespace_flag, "t", uint64_t, unsigned long, "%" PRIu64, namespace_flag_to_string_many_with_check);
|
||||
static BUS_DEFINE_SET_TRANSIENT_TO_STRING_ALLOC(namespace_flag, "t", uint64_t, unsigned long, "%" PRIu64, namespace_flag_to_string_many);
|
||||
static BUS_DEFINE_SET_TRANSIENT_TO_STRING(mount_flags, "t", uint64_t, unsigned long, "%" PRIu64, mount_propagation_flags_to_string_with_check);
|
||||
|
||||
int bus_exec_context_set_transient_property(
|
||||
|
|
|
@ -29,13 +29,6 @@ unsigned long namespace_flag_from_string(const char *name);
|
|||
int namespace_flag_from_string_many(const char *name, unsigned long *ret);
|
||||
int namespace_flag_to_string_many(unsigned long flags, char **ret);
|
||||
|
||||
static inline int namespace_flag_to_string_many_with_check(unsigned long n, char **s) {
|
||||
if ((n & NAMESPACE_FLAGS_ALL) != n)
|
||||
return -EINVAL;
|
||||
|
||||
return namespace_flag_to_string_many(n, s);
|
||||
}
|
||||
|
||||
struct namespace_flag_map {
|
||||
unsigned long flag;
|
||||
const char *name;
|
||||
|
|
Loading…
Reference in a new issue