]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/securebits-util.h
3cb3cb3d0857b23d2d0dbc4d72e612bdb20756a2
1 /* SPDX-License-Identifier: LGPL-2.1+ */
4 #include "securebits.h"
6 int secure_bits_to_string_alloc(int i
, char **s
);
7 int secure_bits_from_string(const char *s
);
9 static inline bool secure_bits_is_valid(int i
) {
10 return ((SECURE_ALL_BITS
| SECURE_ALL_LOCKS
) & i
) == i
;
13 static inline int secure_bits_to_string_alloc_with_check(int n
, char **s
) {
14 if (!secure_bits_is_valid(n
))
17 return secure_bits_to_string_alloc(n
, s
);