diff options
Diffstat (limited to 'src/shared/nsflags.h')
-rw-r--r-- | src/shared/nsflags.h | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/src/shared/nsflags.h b/src/shared/nsflags.h index 51bc590621..7cc26a441d 100644 --- a/src/shared/nsflags.h +++ b/src/shared/nsflags.h @@ -1,25 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #pragma once -/*** - This file is part of systemd. - - Copyright 2016 Lennart Poettering - - systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - systemd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with systemd; If not, see <http://www.gnu.org/licenses/>. -***/ - #include <sched.h> #include "missing.h" @@ -37,17 +18,10 @@ CLONE_NEWUSER| \ CLONE_NEWUTS)) -const char* namespace_flag_to_string(unsigned long flag); -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; +#define NAMESPACE_FLAGS_INITIAL ((unsigned long) -1) - return namespace_flag_to_string_many(n, s); -} +int namespace_flags_from_string(const char *name, unsigned long *ret); +int namespace_flags_to_string(unsigned long flags, char **ret); struct namespace_flag_map { unsigned long flag; |