File tree Expand file tree Collapse file tree 5 files changed +19
-18
lines changed
Expand file tree Collapse file tree 5 files changed +19
-18
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,22 @@ static inline const char *strna(const char *s) {
4545 return s ?: "n/a" ;
4646}
4747
48+ static inline const char * yes_no (bool b ) {
49+ return b ? "yes" : "no" ;
50+ }
51+
52+ static inline const char * true_false (bool b ) {
53+ return b ? "true" : "false" ;
54+ }
55+
56+ static inline const char * one_zero (bool b ) {
57+ return b ? "1" : "0" ;
58+ }
59+
60+ static inline const char * enable_disable (bool b ) {
61+ return b ? "enable" : "disable" ;
62+ }
63+
4864static inline bool isempty (const char * p ) {
4965 return !p || !p [0 ];
5066}
Original file line number Diff line number Diff line change 55
66#include "macro.h"
77
8- static inline const char * yes_no (bool b ) {
9- return b ? "yes" : "no" ;
10- }
11-
12- static inline const char * true_false (bool b ) {
13- return b ? "true" : "false" ;
14- }
15-
16- static inline const char * one_zero (bool b ) {
17- return b ? "1" : "0" ;
18- }
19-
20- static inline const char * enable_disable (bool b ) {
21- return b ? "enable" : "disable" ;
22- }
23-
248extern int saved_argc ;
259extern char * * saved_argv ;
2610
Original file line number Diff line number Diff line change 55#include "log.h"
66#include "nspawn-patch-uid.h"
77#include "user-util.h"
8+ #include "string-util.h"
89#include "tests.h"
9- #include "util.h"
1010
1111int main (int argc , char * argv []) {
1212 uid_t shift , range ;
Original file line number Diff line number Diff line change 55
66#include "fdset.h"
77#include "macro.h"
8+ #include "string-util.h"
89#include "time-util.h"
910
1011int serialize_item (FILE * f , const char * key , const char * value );
Original file line number Diff line number Diff line change 1515#include "macro.h"
1616#include "missing_prctl.h"
1717#include "parse-util.h"
18+ #include "string-util.h"
1819#include "tests.h"
19- #include "util.h"
2020
2121static uid_t test_uid = -1 ;
2222static gid_t test_gid = -1 ;
You can’t perform that action at this time.
0 commit comments