This source file includes following definitions.
- pcmk_any_flags_set
- pcmk_all_flags_set
1
2
3
4
5
6
7
8
9
10 #ifndef PCMK__CRM_COMMON_UTIL__H
11 #define PCMK__CRM_COMMON_UTIL__H
12
13 #include <sys/types.h>
14 #include <stdlib.h>
15 #include <stdbool.h>
16 #include <stdint.h>
17 #include <limits.h>
18 #include <signal.h>
19 #include <glib.h>
20
21 #include <crm/common/acl.h>
22 #include <crm/common/actions.h>
23 #include <crm/common/agents.h>
24 #include <crm/common/results.h>
25 #include <crm/common/scores.h>
26 #include <crm/common/strings.h>
27 #include <crm/common/nvpair.h>
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33
34
35
36
37
38
39
40 char *pcmk_promotion_score_name(const char *rsc_id);
41
42
43 int crm_default_remote_port(void);
44
45 int compare_version(const char *version1, const char *version2);
46
47
48
49
50
51
52
53
54
55
56 static inline bool
57 pcmk_any_flags_set(uint64_t flag_group, uint64_t flags_to_check)
58 {
59 return (flag_group & flags_to_check) != 0;
60 }
61
62
63
64
65
66
67
68
69
70
71 static inline bool
72 pcmk_all_flags_set(uint64_t flag_group, uint64_t flags_to_check)
73 {
74 return (flag_group & flags_to_check) == flags_to_check;
75 }
76
77
78
79
80 #define pcmk_is_set(g, f) pcmk_all_flags_set((g), (f))
81
82 void pcmk_common_cleanup(void);
83 char *crm_md5sum(const char *buffer);
84 char *crm_generate_uuid(void);
85 int crm_user_lookup(const char *name, uid_t * uid, gid_t * gid);
86 int pcmk_daemon_user(uid_t *uid, gid_t *gid);
87
88 #ifdef __cplusplus
89 }
90 #endif
91
92 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1)
93 #include <crm/common/util_compat.h>
94 #endif
95
96 #endif