apparmor-util.h   apparmor-util.h 
skipping to change at line 26 skipping to change at line 26
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#include <stdbool.h> #include <stdbool.h>
bool use_apparmor(void); bool mac_apparmor_use(void);
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added


 architecture.h   architecture.h 
skipping to change at line 31 skipping to change at line 31
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#include <endian.h> #include <endian.h>
#include "util.h" #include "util.h"
/* A cleaned up architecture definition. We don't want to get lost in /* A cleaned up architecture definition. We don't want to get lost in
* processor features, models, generations or even ABIs. Hence we * processor features, models, generations or even ABIs. Hence we
* focus on general family, and distuignish word width and * focus on general family, and distuignish word width and
* endianess. */ * endianness. */
typedef enum Architecture { typedef enum Architecture {
ARCHITECTURE_X86 = 0, ARCHITECTURE_X86 = 0,
ARCHITECTURE_X86_64, ARCHITECTURE_X86_64,
ARCHITECTURE_PPC, ARCHITECTURE_PPC,
ARCHITECTURE_PPC_LE, ARCHITECTURE_PPC_LE,
ARCHITECTURE_PPC64, ARCHITECTURE_PPC64,
ARCHITECTURE_PPC64_LE, ARCHITECTURE_PPC64_LE,
ARCHITECTURE_IA64, ARCHITECTURE_IA64,
ARCHITECTURE_PARISC, ARCHITECTURE_PARISC,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 ask-password-api.h   ask-password-api.h 
skipping to change at line 26 skipping to change at line 26
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#include "util.h" #include "util.h"
int ask_password_tty(const char *message, usec_t until, const char *flag_fi le, char **_passphrase); int ask_password_tty(const char *message, usec_t until, bool echo, const ch ar *flag_file, char **_passphrase);
int ask_password_agent(const char *message, const char *icon, const char *i d, int ask_password_agent(const char *message, const char *icon, const char *i d,
usec_t until, bool accept_cached, char ***_passphras es); usec_t until, bool echo, bool accept_cached, char ** *_passphrases);
int ask_password_auto(const char *message, const char *icon, const char *id , int ask_password_auto(const char *message, const char *icon, const char *id ,
usec_t until, bool accept_cached, char ***_passphrase s); usec_t until, bool accept_cached, char ***_passphrase s);
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 barrier.h   barrier.h 
skipping to change at line 65 skipping to change at line 65
int them; int them;
int pipe[2]; int pipe[2];
int64_t barriers; int64_t barriers;
}; };
#define BARRIER_NULL {-1, -1, {-1, -1}, 0} #define BARRIER_NULL {-1, -1, {-1, -1}, 0}
int barrier_create(Barrier *obj); int barrier_create(Barrier *obj);
void barrier_destroy(Barrier *b); void barrier_destroy(Barrier *b);
DEFINE_TRIVIAL_CLEANUP_FUNC(Barrier*, barrier_destroy);
void barrier_set_role(Barrier *b, unsigned int role); void barrier_set_role(Barrier *b, unsigned int role);
bool barrier_place(Barrier *b); bool barrier_place(Barrier *b);
bool barrier_abort(Barrier *b); bool barrier_abort(Barrier *b);
bool barrier_wait_next(Barrier *b); bool barrier_wait_next(Barrier *b);
bool barrier_wait_abortion(Barrier *b); bool barrier_wait_abortion(Barrier *b);
bool barrier_sync_next(Barrier *b); bool barrier_sync_next(Barrier *b);
bool barrier_sync(Barrier *b); bool barrier_sync(Barrier *b);
 End of changes. 1 change blocks. 
0 lines changed or deleted 2 lines changed or added


 build.h   build.h 
skipping to change at line 66 skipping to change at line 66
#else #else
#define _SMACK_FEATURE_ "-SMACK" #define _SMACK_FEATURE_ "-SMACK"
#endif #endif
#ifdef HAVE_SYSV_COMPAT #ifdef HAVE_SYSV_COMPAT
#define _SYSVINIT_FEATURE_ "+SYSVINIT" #define _SYSVINIT_FEATURE_ "+SYSVINIT"
#else #else
#define _SYSVINIT_FEATURE_ "-SYSVINIT" #define _SYSVINIT_FEATURE_ "-SYSVINIT"
#endif #endif
#ifdef HAVE_UTMP
#define _UTMP_FEATURE_ "+UTMP"
#else
#define _UTMP_FEATURE_ "-UTMP"
#endif
#ifdef HAVE_LIBCRYPTSETUP #ifdef HAVE_LIBCRYPTSETUP
#define _LIBCRYPTSETUP_FEATURE_ "+LIBCRYPTSETUP" #define _LIBCRYPTSETUP_FEATURE_ "+LIBCRYPTSETUP"
#else #else
#define _LIBCRYPTSETUP_FEATURE_ "-LIBCRYPTSETUP" #define _LIBCRYPTSETUP_FEATURE_ "-LIBCRYPTSETUP"
#endif #endif
#ifdef HAVE_GCRYPT #ifdef HAVE_GCRYPT
#define _GCRYPT_FEATURE_ "+GCRYPT" #define _GCRYPT_FEATURE_ "+GCRYPT"
#else #else
#define _GCRYPT_FEATURE_ "-GCRYPT" #define _GCRYPT_FEATURE_ "-GCRYPT"
skipping to change at line 126 skipping to change at line 132
#else #else
#define _ELFUTILS_FEATURE_ "-ELFUTILS" #define _ELFUTILS_FEATURE_ "-ELFUTILS"
#endif #endif
#ifdef HAVE_KMOD #ifdef HAVE_KMOD
#define _KMOD_FEATURE_ "+KMOD" #define _KMOD_FEATURE_ "+KMOD"
#else #else
#define _KMOD_FEATURE_ "-KMOD" #define _KMOD_FEATURE_ "-KMOD"
#endif #endif
#ifdef HAVE_KMOD
#define _KMOD_FEATURE_ "+KMOD"
#else
#define _KMOD_FEATURE_ "-KMOD"
#endif
#ifdef HAVE_LIBIDN #ifdef HAVE_LIBIDN
#define _IDN_FEATURE_ "+IDN" #define _IDN_FEATURE_ "+IDN"
#else #else
#define _IDN_FEATURE_ "-IDN" #define _IDN_FEATURE_ "-IDN"
#endif #endif
#define SYSTEMD_FEATURES \ #define SYSTEMD_FEATURES \
_PAM_FEATURE_ " " \ _PAM_FEATURE_ " " \
_AUDIT_FEATURE_ " " \ _AUDIT_FEATURE_ " " \
_SELINUX_FEATURE_ " " \ _SELINUX_FEATURE_ " " \
_IMA_FEATURE_ " " \ _IMA_FEATURE_ " " \
_APPARMOR_FEATURE_ " " \ _APPARMOR_FEATURE_ " " \
_SMACK_FEATURE_ " " \ _SMACK_FEATURE_ " " \
_SYSVINIT_FEATURE_ " " \ _SYSVINIT_FEATURE_ " " \
_UTMP_FEATURE_ " " \
_LIBCRYPTSETUP_FEATURE_ " " \ _LIBCRYPTSETUP_FEATURE_ " " \
_GCRYPT_FEATURE_ " " \ _GCRYPT_FEATURE_ " " \
_GNUTLS_FEATURE_ " " \ _GNUTLS_FEATURE_ " " \
_ACL_FEATURE_ " " \ _ACL_FEATURE_ " " \
_XZ_FEATURE_ " " \ _XZ_FEATURE_ " " \
_LZ4_FEATURE_ " " \ _LZ4_FEATURE_ " " \
_SECCOMP_FEATURE_ " " \ _SECCOMP_FEATURE_ " " \
_BLKID_FEATURE_ " " \ _BLKID_FEATURE_ " " \
_ELFUTILS_FEATURE_ " " \ _ELFUTILS_FEATURE_ " " \
_KMOD_FEATURE_ " " \ _KMOD_FEATURE_ " " \
 End of changes. 3 change blocks. 
6 lines changed or deleted 7 lines changed or added


 bus-internal.h   bus-internal.h 
skipping to change at line 233 skipping to change at line 233
size_t windex; size_t windex;
size_t wqueue_allocated; size_t wqueue_allocated;
uint64_t cookie; uint64_t cookie;
char *unique_name; char *unique_name;
uint64_t unique_id; uint64_t unique_id;
struct bus_match_node match_callbacks; struct bus_match_node match_callbacks;
Prioq *reply_callbacks_prioq; Prioq *reply_callbacks_prioq;
Hashmap *reply_callbacks; OrderedHashmap *reply_callbacks;
LIST_HEAD(struct filter_callback, filter_callbacks); LIST_HEAD(struct filter_callback, filter_callbacks);
Hashmap *nodes; Hashmap *nodes;
Hashmap *vtable_methods; Hashmap *vtable_methods;
Hashmap *vtable_properties; Hashmap *vtable_properties;
union sockaddr_union sockaddr; union sockaddr_union sockaddr;
socklen_t sockaddr_size; socklen_t sockaddr_size;
char *kernel; char *kernel;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 bus-kernel.h   bus-kernel.h 
skipping to change at line 27 skipping to change at line 27
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#include <stdbool.h> #include <stdbool.h>
#include "busname.h" #include "busname.h"
#include "bus-endpoint.h"
#include "sd-bus.h" #include "sd-bus.h"
#define KDBUS_ITEM_NEXT(item) \ #define KDBUS_ITEM_NEXT(item) \
(typeof(item))(((uint8_t *)item) + ALIGN8((item)->size)) (typeof(item))(((uint8_t *)item) + ALIGN8((item)->size))
#define KDBUS_ITEM_FOREACH(part, head, first) \ #define KDBUS_ITEM_FOREACH(part, head, first) \
for (part = (head)->first; \ for (part = (head)->first; \
((uint8_t *)(part) < (uint8_t *)(head) + (head)->size) && \ ((uint8_t *)(part) < (uint8_t *)(head) + (head)->size) && \
((uint8_t *) part >= (uint8_t *) head); \ ((uint8_t *) part >= (uint8_t *) head); \
part = KDBUS_ITEM_NEXT(part)) part = KDBUS_ITEM_NEXT(part))
skipping to change at line 69 skipping to change at line 70
size_t allocated; size_t allocated;
}; };
int bus_kernel_connect(sd_bus *b); int bus_kernel_connect(sd_bus *b);
int bus_kernel_take_fd(sd_bus *b); int bus_kernel_take_fd(sd_bus *b);
int bus_kernel_write_message(sd_bus *bus, sd_bus_message *m, bool hint_sync _call); int bus_kernel_write_message(sd_bus *bus, sd_bus_message *m, bool hint_sync _call);
int bus_kernel_read_message(sd_bus *bus, bool hint_priority, int64_t priori ty); int bus_kernel_read_message(sd_bus *bus, bool hint_priority, int64_t priori ty);
int bus_kernel_open_bus_fd(const char *bus, char **path); int bus_kernel_open_bus_fd(const char *bus, char **path);
int bus_kernel_make_starter(int fd, const char *name, bool activating, bool accept_fd, BusNamePolicy *policy, BusNamePolicyAccess world_policy); int bus_kernel_make_starter(int fd, const char *name, bool activating, bool accept_fd, BusNamePolicy *policy, BusPolicyAccess world_policy);
int bus_kernel_create_bus(const char *name, bool world, char **s); int bus_kernel_create_bus(const char *name, bool world, char **s);
int bus_kernel_create_endpoint(const char *bus_name, const char *ep_name, c har **path);
int bus_kernel_create_domain(const char *name, char **s); int bus_kernel_create_domain(const char *name, char **s);
int bus_kernel_create_monitor(const char *bus);
int bus_kernel_set_endpoint_policy(int fd, uid_t uid, BusEndpoint *ep);
int bus_kernel_pop_memfd(sd_bus *bus, void **address, size_t *mapped, size_ t *allocated); int bus_kernel_pop_memfd(sd_bus *bus, void **address, size_t *mapped, size_ t *allocated);
void bus_kernel_push_memfd(sd_bus *bus, int fd, void *address, size_t mappe d, size_t allocated); void bus_kernel_push_memfd(sd_bus *bus, int fd, void *address, size_t mappe d, size_t allocated);
void bus_kernel_flush_memfd(sd_bus *bus); void bus_kernel_flush_memfd(sd_bus *bus);
int bus_kernel_parse_unique_name(const char *s, uint64_t *id); int bus_kernel_parse_unique_name(const char *s, uint64_t *id);
int kdbus_translate_request_name_flags(uint64_t sd_bus_flags, uint64_t *kdb us_flags); int kdbus_translate_request_name_flags(uint64_t sd_bus_flags, uint64_t *kdb us_flags);
int kdbus_translate_attach_flags(uint64_t sd_bus_flags, uint64_t *kdbus_fla gs); int kdbus_translate_attach_flags(uint64_t sd_bus_flags, uint64_t *kdbus_fla gs);
 End of changes. 4 change blocks. 
2 lines changed or deleted 5 lines changed or added


 bus-policy.h   bus-policy.h 
skipping to change at line 79 skipping to change at line 79
typedef struct Policy { typedef struct Policy {
LIST_HEAD(PolicyItem, default_items); LIST_HEAD(PolicyItem, default_items);
LIST_HEAD(PolicyItem, mandatory_items); LIST_HEAD(PolicyItem, mandatory_items);
Hashmap *user_items; Hashmap *user_items;
Hashmap *group_items; Hashmap *group_items;
} Policy; } Policy;
int policy_load(Policy *p, char **files); int policy_load(Policy *p, char **files);
void policy_free(Policy *p); void policy_free(Policy *p);
bool policy_check_own(Policy *p, const struct ucred *ucred, const char *nam
e);
bool policy_check_hello(Policy *p, const struct ucred *ucred);
bool policy_check_recv(Policy *p,
const struct ucred *ucred,
int message_type,
const char *name,
const char *path,
const char *interface,
const char *member);
bool policy_check_send(Policy *p,
const struct ucred *ucred,
int message_type,
const char *name,
const char *path,
const char *interface,
const char *member);
void policy_dump(Policy *p); void policy_dump(Policy *p);
const char* policy_item_type_to_string(PolicyItemType t) _const_; const char* policy_item_type_to_string(PolicyItemType t) _const_;
PolicyItemType policy_item_type_from_string(const char *s) _pure_; PolicyItemType policy_item_type_from_string(const char *s) _pure_;
const char* policy_item_class_to_string(PolicyItemClass t) _const_; const char* policy_item_class_to_string(PolicyItemClass t) _const_;
PolicyItemClass policy_item_class_from_string(const char *s) _pure_; PolicyItemClass policy_item_class_from_string(const char *s) _pure_;
 End of changes. 1 change blocks. 
0 lines changed or deleted 18 lines changed or added


 bus-protocol.h   bus-protocol.h 
skipping to change at line 45 skipping to change at line 45
#else #else
BUS_NATIVE_ENDIAN = BUS_LITTLE_ENDIAN, BUS_NATIVE_ENDIAN = BUS_LITTLE_ENDIAN,
BUS_REVERSE_ENDIAN = BUS_BIG_ENDIAN BUS_REVERSE_ENDIAN = BUS_BIG_ENDIAN
#endif #endif
}; };
/* Flags */ /* Flags */
enum { enum {
BUS_MESSAGE_NO_REPLY_EXPECTED = 1, BUS_MESSAGE_NO_REPLY_EXPECTED = 1,
BUS_MESSAGE_NO_AUTO_START = 2 BUS_MESSAGE_NO_AUTO_START = 2,
BUS_MESSAGE_ALLOW_INTERACTIVE_AUTHORIZATION = 4,
}; };
/* Header fields */ /* Header fields */
enum { enum {
_BUS_MESSAGE_HEADER_INVALID = 0, _BUS_MESSAGE_HEADER_INVALID = 0,
BUS_MESSAGE_HEADER_PATH, BUS_MESSAGE_HEADER_PATH,
BUS_MESSAGE_HEADER_INTERFACE, BUS_MESSAGE_HEADER_INTERFACE,
BUS_MESSAGE_HEADER_MEMBER, BUS_MESSAGE_HEADER_MEMBER,
BUS_MESSAGE_HEADER_ERROR_NAME, BUS_MESSAGE_HEADER_ERROR_NAME,
 End of changes. 1 change blocks. 
1 lines changed or deleted 2 lines changed or added


 bus-type.h   bus-type.h 
skipping to change at line 32 skipping to change at line 32
***/ ***/
#include <stdbool.h> #include <stdbool.h>
#include "sd-bus.h" #include "sd-bus.h"
#include "sd-bus-protocol.h" #include "sd-bus-protocol.h"
bool bus_type_is_valid(char c) _const_; bool bus_type_is_valid(char c) _const_;
bool bus_type_is_valid_in_signature(char c) _const_; bool bus_type_is_valid_in_signature(char c) _const_;
bool bus_type_is_basic(char c) _const_; bool bus_type_is_basic(char c) _const_;
/* "trivial" is systemd's term for what the D-Bus Specification calls
* a "fixed type": that is, a basic type of fixed length */
bool bus_type_is_trivial(char c) _const_; bool bus_type_is_trivial(char c) _const_;
bool bus_type_is_container(char c) _const_; bool bus_type_is_container(char c) _const_;
int bus_type_get_alignment(char c) _const_; int bus_type_get_alignment(char c) _const_;
int bus_type_get_size(char c) _const_; int bus_type_get_size(char c) _const_;
 End of changes. 1 change blocks. 
0 lines changed or deleted 2 lines changed or added


 bus-util.h   bus-util.h 
skipping to change at line 49 skipping to change at line 49
struct bus_properties_map { struct bus_properties_map {
const char *member; const char *member;
const char *signature; const char *signature;
bus_property_set_t set; bus_property_set_t set;
size_t offset; size_t offset;
}; };
int bus_map_id128(sd_bus *bus, const char *member, sd_bus_message *m, sd_bu s_error *error, void *userdata); int bus_map_id128(sd_bus *bus, const char *member, sd_bus_message *m, sd_bu s_error *error, void *userdata);
int bus_message_map_all_properties(sd_bus *bus,
sd_bus_message *m,
const struct bus_properties_map *map,
void *userdata);
int bus_message_map_properties_changed(sd_bus *bus,
sd_bus_message *m,
const struct bus_properties_map *map
,
void *userdata);
int bus_map_all_properties(sd_bus *bus, int bus_map_all_properties(sd_bus *bus,
const char *destination, const char *destination,
const char *path, const char *path,
const struct bus_properties_map *map, const struct bus_properties_map *map,
void *userdata); void *userdata);
int bus_async_unregister_and_exit(sd_event *e, sd_bus *bus, const char *nam e); int bus_async_unregister_and_exit(sd_event *e, sd_bus *bus, const char *nam e);
typedef bool (*check_idle_t)(void *userdata); typedef bool (*check_idle_t)(void *userdata);
 End of changes. 1 change blocks. 
0 lines changed or deleted 9 lines changed or added


 busname.h   busname.h 
skipping to change at line 28 skipping to change at line 28
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
typedef struct BusName BusName; typedef struct BusName BusName;
typedef struct BusNamePolicy BusNamePolicy; typedef struct BusNamePolicy BusNamePolicy;
#include "unit.h" #include "unit.h"
#include "bus-common.h"
typedef enum BusNameState { typedef enum BusNameState {
BUSNAME_DEAD, BUSNAME_DEAD,
BUSNAME_MAKING, BUSNAME_MAKING,
BUSNAME_REGISTERED, BUSNAME_REGISTERED,
BUSNAME_LISTENING, BUSNAME_LISTENING,
BUSNAME_RUNNING, BUSNAME_RUNNING,
BUSNAME_SIGTERM, BUSNAME_SIGTERM,
BUSNAME_SIGKILL, BUSNAME_SIGKILL,
BUSNAME_FAILED, BUSNAME_FAILED,
skipping to change at line 61 skipping to change at line 62
_BUSNAME_RESULT_INVALID = -1 _BUSNAME_RESULT_INVALID = -1
} BusNameResult; } BusNameResult;
typedef enum BusNamePolicyType { typedef enum BusNamePolicyType {
BUSNAME_POLICY_TYPE_USER, BUSNAME_POLICY_TYPE_USER,
BUSNAME_POLICY_TYPE_GROUP, BUSNAME_POLICY_TYPE_GROUP,
_BUSNAME_POLICY_TYPE_MAX, _BUSNAME_POLICY_TYPE_MAX,
_BUSNAME_POLICY_TYPE_INVALID = -1 _BUSNAME_POLICY_TYPE_INVALID = -1
} BusNamePolicyType; } BusNamePolicyType;
typedef enum BusNamePolicyAccess {
BUSNAME_POLICY_ACCESS_SEE,
BUSNAME_POLICY_ACCESS_TALK,
BUSNAME_POLICY_ACCESS_OWN,
_BUSNAME_POLICY_ACCESS_MAX,
_BUSNAME_POLICY_ACCESS_INVALID = -1
} BusNamePolicyAccess;
struct BusNamePolicy { struct BusNamePolicy {
BusNamePolicyType type; BusNamePolicyType type;
BusNamePolicyAccess access; BusPolicyAccess access;
char *name; char *name;
LIST_FIELDS(BusNamePolicy, policy); LIST_FIELDS(BusNamePolicy, policy);
}; };
struct BusName { struct BusName {
Unit meta; Unit meta;
char *name; char *name;
skipping to change at line 100 skipping to change at line 93
BusNameResult result; BusNameResult result;
usec_t timeout_usec; usec_t timeout_usec;
sd_event_source *starter_event_source; sd_event_source *starter_event_source;
sd_event_source *timer_event_source; sd_event_source *timer_event_source;
pid_t control_pid; pid_t control_pid;
LIST_HEAD(BusNamePolicy, policy); LIST_HEAD(BusNamePolicy, policy);
BusNamePolicyAccess policy_world; BusPolicyAccess policy_world;
}; };
extern const UnitVTable busname_vtable; extern const UnitVTable busname_vtable;
const char* busname_state_to_string(BusNameState i) _const_; const char* busname_state_to_string(BusNameState i) _const_;
BusNameState busname_state_from_string(const char *s) _pure_; BusNameState busname_state_from_string(const char *s) _pure_;
const char* busname_result_to_string(BusNameResult i) _const_; const char* busname_result_to_string(BusNameResult i) _const_;
BusNameResult busname_result_from_string(const char *s) _pure_; BusNameResult busname_result_from_string(const char *s) _pure_;
const char* busname_policy_access_to_string(BusNamePolicyAccess i) _const_;
BusNamePolicyAccess busname_policy_access_from_string(const char *s) _pure_
;
 End of changes. 5 change blocks. 
10 lines changed or deleted 3 lines changed or added


 catalog.h   catalog.h 
skipping to change at line 31 skipping to change at line 31
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#include <stdbool.h> #include <stdbool.h>
#include "sd-id128.h" #include "sd-id128.h"
#include "hashmap.h" #include "hashmap.h"
#include "strbuf.h" #include "strbuf.h"
int catalog_import_file(Hashmap *h, struct strbuf *sb, const char *path); int catalog_import_file(Hashmap *h, struct strbuf *sb, const char *path);
unsigned long catalog_hash_func(const void *p, const uint8_t hash_key[HASH_
KEY_SIZE]);
int catalog_compare_func(const void *a, const void *b) _pure_;
int catalog_update(const char* database, const char* root, const char* cons t* dirs); int catalog_update(const char* database, const char* root, const char* cons t* dirs);
int catalog_get(const char* database, sd_id128_t id, char **data); int catalog_get(const char* database, sd_id128_t id, char **data);
int catalog_list(FILE *f, const char* database, bool oneline); int catalog_list(FILE *f, const char* database, bool oneline);
int catalog_list_items(FILE *f, const char* database, bool oneline, char ** items); int catalog_list_items(FILE *f, const char* database, bool oneline, char ** items);
int catalog_file_lang(const char *filename, char **lang); int catalog_file_lang(const char *filename, char **lang);
extern const char * const catalog_file_dirs[]; extern const char * const catalog_file_dirs[];
extern const struct hash_ops catalog_hash_ops;
 End of changes. 2 change blocks. 
3 lines changed or deleted 0 lines changed or added


 conf-parser.h   conf-parser.h 
skipping to change at line 172 skipping to change at line 172
const char *filename, \ const char *filename, \
unsigned line, \ unsigned line, \
const char *section, \ const char *section, \
unsigned section_line, \ unsigned section_line, \
const char *lvalue, \ const char *lvalue, \
int ltype, \ int ltype, \
const char *rvalue, \ const char *rvalue, \
void *data, \ void *data, \
void *userdata) { \ void *userdata) { \
\ \
type **enums = data, *xs, x, *ys; type **enums = data, x, *ys;
\ \
_cleanup_free_ type *xs = NULL;
\
const char *word, *state; \ const char *word, *state; \
size_t l, i = 0; \ size_t l, i = 0; \
\ \
assert(filename); \ assert(filename); \
assert(lvalue); \ assert(lvalue); \
assert(rvalue); \ assert(rvalue); \
assert(data); \ assert(data); \
\ \
xs = new0(type, 1); \ xs = new0(type, 1); \
if(!xs)
\
return -ENOMEM;
\
\
*xs = invalid; \ *xs = invalid; \
\ \
FOREACH_WORD(word, l, rvalue, state) { \ FOREACH_WORD(word, l, rvalue, state) { \
_cleanup_free_ char *en = NULL; \ _cleanup_free_ char *en = NULL; \
type *new_xs; \
\ \
en = strndup(word, l); \ en = strndup(word, l); \
if (!en) \ if (!en) \
return -ENOMEM; \ return -ENOMEM; \
\ \
if ((x = name##_from_string(en)) < 0) { \ if ((x = name##_from_string(en)) < 0) { \
log_syntax(unit, LOG_ERR, filename, line, \ log_syntax(unit, LOG_ERR, filename, line, \
-x, msg ", ignoring: %s", en); \ -x, msg ", ignoring: %s", en); \
continue; \ continue; \
} \ } \
skipping to change at line 211 skipping to change at line 216
"Duplicate entry, ignoring: % s", \ "Duplicate entry, ignoring: % s", \
en); \ en); \
x = invalid; \ x = invalid; \
} \ } \
} \ } \
\ \
if (x == invalid) \ if (x == invalid) \
continue; \ continue; \
\ \
*(xs + i) = x; \ *(xs + i) = x; \
xs = realloc(xs, (++i + 1) * sizeof(type)); new_xs = realloc(xs, (++i + 1) * sizeof(type));
\ \
if (!xs) if (new_xs)
\ \
xs = new_xs;
\
else
\
return -ENOMEM; \ return -ENOMEM; \
\
*(xs + i) = invalid; \ *(xs + i) = invalid; \
} \ } \
\ \
free(*enums); \ free(*enums); \
*enums = xs; \ *enums = xs; \
xs = NULL;
\
\
return 0; \ return 0; \
} }
 End of changes. 6 change blocks. 
6 lines changed or deleted 24 lines changed or added


 config.h   config.h 
skipping to change at line 113 skipping to change at line 113
/* Define to 1 if you have the <dlfcn.h> header file. */ /* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1 #define HAVE_DLFCN_H 1
/* ELFUTILS available */ /* ELFUTILS available */
/* #undef HAVE_ELFUTILS */ /* #undef HAVE_ELFUTILS */
/* Define to 1 if you have the <elfutils/libdwfl.h> header file. */ /* Define to 1 if you have the <elfutils/libdwfl.h> header file. */
#define HAVE_ELFUTILS_LIBDWFL_H 1 #define HAVE_ELFUTILS_LIBDWFL_H 1
/* Define to 1 if you have the `fanotify_init' function. */
#define HAVE_FANOTIFY_INIT 1
/* Define to 1 if you have the `fanotify_mark' function. */
#define HAVE_FANOTIFY_MARK 1
/* Define to 1 if you have the <fcntl.h> header file. */ /* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1 #define HAVE_FCNTL_H 1
/* Define if FIRMWARE is available */
/* #undef HAVE_FIRMWARE */
/* GCRYPT available */ /* GCRYPT available */
#define HAVE_GCRYPT 1 #define HAVE_GCRYPT 1
/* Define to 1 if you have the `gethostbyaddr' function. */ /* Define to 1 if you have the `gethostbyaddr' function. */
#define HAVE_GETHOSTBYADDR 1 #define HAVE_GETHOSTBYADDR 1
/* Define to 1 if you have the `gethostbyname' function. */ /* Define to 1 if you have the `gethostbyname' function. */
#define HAVE_GETHOSTBYNAME 1 #define HAVE_GETHOSTBYNAME 1
/* Define to 1 if you have the `gettimeofday' function. */ /* Define to 1 if you have the `gettimeofday' function. */
skipping to change at line 173 skipping to change at line 164
/* Define to 1 if you have the `dw' library (-ldw). */ /* Define to 1 if you have the `dw' library (-ldw). */
#define HAVE_LIBDW 1 #define HAVE_LIBDW 1
/* Define if libidn is available */ /* Define if libidn is available */
#define HAVE_LIBIDN 1 #define HAVE_LIBIDN 1
/* Define to 1 if you have the <linux/btrfs.h> header file. */ /* Define to 1 if you have the <linux/btrfs.h> header file. */
/* #undef HAVE_LINUX_BTRFS_H */ /* #undef HAVE_LINUX_BTRFS_H */
/* Define to 1 if you have the <linux/memfd.h> header file. */
/* #undef HAVE_LINUX_MEMFD_H */
/* Logind support available */ /* Logind support available */
#define HAVE_LOGIND 1 #define HAVE_LOGIND 1
/* Define in LZ4 is available */ /* Define in LZ4 is available */
/* #undef HAVE_LZ4 */ /* #undef HAVE_LZ4 */
/* Define to 1 if you have the <lz4.h> header file. */ /* Define to 1 if you have the <lz4.h> header file. */
/* #undef HAVE_LZ4_H */ /* #undef HAVE_LZ4_H */
/* Machined support available */ /* Machined support available */
#define HAVE_MACHINED 1 #define HAVE_MACHINED 1
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and /* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */ to 0 otherwise. */
#define HAVE_MALLOC 1 #define HAVE_MALLOC 1
/* Define to 1 if you have the `memfd_create' function. */
/* #undef HAVE_MEMFD_CREATE */
/* Define to 1 if you have the <memory.h> header file. */ /* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1 #define HAVE_MEMORY_H 1
/* Define to 1 if you have the `memset' function. */ /* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1 #define HAVE_MEMSET 1
/* Define if microhttpd is available */ /* Define if microhttpd is available */
/* #undef HAVE_MICROHTTPD */ /* #undef HAVE_MICROHTTPD */
/* Define to 1 if you have the <netdb.h> header file. */ /* Define to 1 if you have the <netdb.h> header file. */
skipping to change at line 306 skipping to change at line 303
/* Define to 1 if you have the <sys/time.h> header file. */ /* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1 #define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */ /* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */ /* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1 #define HAVE_UNISTD_H 1
/* Define if utmp/wtmp support is enabled */
#define HAVE_UTMP 1
/* Define to 1 if you have the <valgrind/memcheck.h> header file. */ /* Define to 1 if you have the <valgrind/memcheck.h> header file. */
#define HAVE_VALGRIND_MEMCHECK_H 1 #define HAVE_VALGRIND_MEMCHECK_H 1
/* Define to 1 if you have the <valgrind/valgrind.h> header file. */ /* Define to 1 if you have the <valgrind/valgrind.h> header file. */
#define HAVE_VALGRIND_VALGRIND_H 1 #define HAVE_VALGRIND_VALGRIND_H 1
/* Define if XZ is available */ /* Define if XZ is available */
#define HAVE_XZ 1 #define HAVE_XZ 1
/* Define to 1 if you have the `__secure_getenv' function. */ /* Define to 1 if you have the `__secure_getenv' function. */
skipping to change at line 341 skipping to change at line 341
/* Name of package */ /* Name of package */
#define PACKAGE "systemd" #define PACKAGE "systemd"
/* Define to the address where bug reports for this package should be sent. */ /* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "http://bugs.freedesktop.org/enter_bug.cgi?produc t=systemd" #define PACKAGE_BUGREPORT "http://bugs.freedesktop.org/enter_bug.cgi?produc t=systemd"
/* Define to the full name of this package. */ /* Define to the full name of this package. */
#define PACKAGE_NAME "systemd" #define PACKAGE_NAME "systemd"
/* Define to the full name and version of this package. */ /* Define to the full name and version of this package. */
#define PACKAGE_STRING "systemd 216" #define PACKAGE_STRING "systemd 217"
/* Define to the one symbol short name of this package. */ /* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "systemd" #define PACKAGE_TARNAME "systemd"
/* Define to the home page for this package. */ /* Define to the home page for this package. */
#define PACKAGE_URL "http://www.freedesktop.org/wiki/Software/systemd" #define PACKAGE_URL "http://www.freedesktop.org/wiki/Software/systemd"
/* Define to the version of this package. */ /* Define to the version of this package. */
#define PACKAGE_VERSION "216" #define PACKAGE_VERSION "217"
/* Path of /etc/rc.local script */ /* Path of /etc/rc.local script */
#define RC_LOCAL_SCRIPT_PATH_START "/etc/rc.local" #define RC_LOCAL_SCRIPT_PATH_START "/etc/rc.local"
/* Path of /usr/sbin/halt.local script */ /* Path of /usr/sbin/halt.local script */
#define RC_LOCAL_SCRIPT_PATH_STOP "/usr/sbin/halt.local" #define RC_LOCAL_SCRIPT_PATH_STOP "/usr/sbin/halt.local"
/* Define to the type of arg 1 for `select'. */ /* Define to the type of arg 1 for `select'. */
#define SELECT_TYPE_ARG1 int #define SELECT_TYPE_ARG1 int
skipping to change at line 401 skipping to change at line 401
/* Maximum System GID */ /* Maximum System GID */
#define SYSTEM_GID_MAX 999 #define SYSTEM_GID_MAX 999
/* Maximum System UID */ /* Maximum System UID */
#define SYSTEM_UID_MAX 999 #define SYSTEM_UID_MAX 999
/* Path to telinit */ /* Path to telinit */
#define TELINIT "/lib/sysvinit/telinit" #define TELINIT "/lib/sysvinit/telinit"
/* Time Epoch */ /* Time Epoch */
#define TIME_EPOCH 1408486694 #define TIME_EPOCH 1414516239
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1 #define TIME_WITH_SYS_TIME 1
/* GID of the 'tty' group */ /* GID of the 'tty' group */
#define TTY_GID 5 #define TTY_GID 5
/* Enable extensions on AIX 3, Interix. */ /* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE #ifndef _ALL_SOURCE
# define _ALL_SOURCE 1 # define _ALL_SOURCE 1
skipping to change at line 431 skipping to change at line 431
/* Enable extensions on HP NonStop. */ /* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE #ifndef _TANDEM_SOURCE
# define _TANDEM_SOURCE 1 # define _TANDEM_SOURCE 1
#endif #endif
/* Enable general extensions on Solaris. */ /* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__ #ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1 # define __EXTENSIONS__ 1
#endif #endif
/* Version number of package */ /* Version number of package */
#define VERSION "216" #define VERSION "217"
/* Enable large inode numbers on Mac OS X 10.5. */ /* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE #ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1 # define _DARWIN_USE_64_BIT_INODE 1
#endif #endif
/* Number of bits in a file offset, on hosts where this is settable. */ /* Number of bits in a file offset, on hosts where this is settable. */
#define _FILE_OFFSET_BITS 64 #define _FILE_OFFSET_BITS 64
/* Define for large files, on AIX-style hosts. */ /* Define for large files, on AIX-style hosts. */
 End of changes. 9 change blocks. 
13 lines changed or deleted 13 lines changed or added


 dhcp-internal.h   dhcp-internal.h 
skipping to change at line 27 skipping to change at line 27
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#include <stdint.h> #include <stdint.h>
#include <linux/if_packet.h> #include <linux/if_packet.h>
#include <net/if_arp.h>
#include <net/ethernet.h> #include <net/ethernet.h>
#include "socket-util.h" #include "socket-util.h"
#include "sd-dhcp-client.h" #include "sd-dhcp-client.h"
#include "dhcp-protocol.h" #include "dhcp-protocol.h"
int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link, uin int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link,
t32_t xid, struct ether_addr mac_addr); uint32_t xid, const uint8_t *mac_addr,
size_t mac_addr_len, uint16_t arp_type);
int dhcp_network_bind_udp_socket(be32_t address, uint16_t port); int dhcp_network_bind_udp_socket(be32_t address, uint16_t port);
int dhcp_network_send_raw_socket(int s, const union sockaddr_union *link, int dhcp_network_send_raw_socket(int s, const union sockaddr_union *link,
const void *packet, size_t len); const void *packet, size_t len);
int dhcp_network_send_udp_socket(int s, be32_t address, uint16_t port, int dhcp_network_send_udp_socket(int s, be32_t address, uint16_t port,
const void *packet, size_t len); const void *packet, size_t len);
int dhcp_option_append(DHCPMessage *message, size_t size, size_t *offset, u int8_t overload, int dhcp_option_append(DHCPMessage *message, size_t size, size_t *offset, u int8_t overload,
uint8_t code, size_t optlen, const void *optval); uint8_t code, size_t optlen, const void *optval);
typedef int (*dhcp_option_cb_t)(uint8_t code, uint8_t len, typedef int (*dhcp_option_cb_t)(uint8_t code, uint8_t len,
const uint8_t *option, void *user_data); const uint8_t *option, void *user_data);
int dhcp_option_parse(DHCPMessage *message, size_t len, int dhcp_option_parse(DHCPMessage *message, size_t len,
dhcp_option_cb_t cb, void *user_data); dhcp_option_cb_t cb, void *user_data);
int dhcp_message_init(DHCPMessage *message, uint8_t op, uint32_t xid, uint8 int dhcp_message_init(DHCPMessage *message, uint8_t op, uint32_t xid,
_t type, uint8_t type, uint16_t arp_type, size_t optlen,
size_t optlen, size_t *optoffset); size_t *optoffset);
uint16_t dhcp_packet_checksum(uint8_t *buf, size_t len); uint16_t dhcp_packet_checksum(uint8_t *buf, size_t len);
void dhcp_packet_append_ip_headers(DHCPPacket *packet, be32_t source_addr, void dhcp_packet_append_ip_headers(DHCPPacket *packet, be32_t source_addr,
uint16_t source, be32_t destination_addr , uint16_t source, be32_t destination_addr ,
uint16_t destination, uint16_t len); uint16_t destination, uint16_t len);
int dhcp_packet_verify_headers(DHCPPacket *packet, size_t len, bool checksu m); int dhcp_packet_verify_headers(DHCPPacket *packet, size_t len, bool checksu m);
DEFINE_TRIVIAL_CLEANUP_FUNC(sd_dhcp_client*, sd_dhcp_client_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(sd_dhcp_client*, sd_dhcp_client_unref);
 End of changes. 3 change blocks. 
5 lines changed or deleted 7 lines changed or added


 dhcp6-internal.h   dhcp6-internal.h 
skipping to change at line 41 skipping to change at line 41
typedef struct DHCP6Address DHCP6Address; typedef struct DHCP6Address DHCP6Address;
struct DHCP6Address { struct DHCP6Address {
LIST_FIELDS(DHCP6Address, addresses); LIST_FIELDS(DHCP6Address, addresses);
struct { struct {
struct in6_addr address; struct in6_addr address;
be32_t lifetime_preferred; be32_t lifetime_preferred;
be32_t lifetime_valid; be32_t lifetime_valid;
} _packed_; } iaaddr _packed_;
}; };
struct DHCP6IA { struct DHCP6IA {
uint16_t type; uint16_t type;
struct { struct {
be32_t id; be32_t id;
be32_t lifetime_t1; be32_t lifetime_t1;
be32_t lifetime_t2; be32_t lifetime_t2;
} _packed_; } _packed_;
sd_event_source *timeout_t1; sd_event_source *timeout_t1;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 env-util.h   env-util.h 
skipping to change at line 33 skipping to change at line 33
#include <stdbool.h> #include <stdbool.h>
#include <sys/types.h> #include <sys/types.h>
bool env_name_is_valid(const char *e); bool env_name_is_valid(const char *e);
bool env_value_is_valid(const char *e); bool env_value_is_valid(const char *e);
bool env_assignment_is_valid(const char *e); bool env_assignment_is_valid(const char *e);
bool strv_env_is_valid(char **e); bool strv_env_is_valid(char **e);
char **strv_env_clean(char **l); char **strv_env_clean(char **l);
char **strv_env_clean_log(char **e, const char *message); char **strv_env_clean_log(char **e, const char *unit_id, const char *messag e);
bool strv_env_name_or_assignment_is_valid(char **l); bool strv_env_name_or_assignment_is_valid(char **l);
char **strv_env_merge(unsigned n_lists, ...); char **strv_env_merge(unsigned n_lists, ...);
char **strv_env_delete(char **x, unsigned n_lists, ...); /* New copy */ char **strv_env_delete(char **x, unsigned n_lists, ...); /* New copy */
char **strv_env_set(char **x, const char *p); /* New copy ... */ char **strv_env_set(char **x, const char *p); /* New copy ... */
char **strv_env_unset(char **l, const char *p); /* In place ... */ char **strv_env_unset(char **l, const char *p); /* In place ... */
char **strv_env_unset_many(char **l, ...) _sentinel_; char **strv_env_unset_many(char **l, ...) _sentinel_;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 ethtool-util.h   ethtool-util.h 
skipping to change at line 45 skipping to change at line 45
typedef enum WakeOnLan { typedef enum WakeOnLan {
WOL_PHY, WOL_PHY,
WOL_MAGIC, WOL_MAGIC,
WOL_OFF, WOL_OFF,
_WOL_MAX, _WOL_MAX,
_WOL_INVALID = -1 _WOL_INVALID = -1
} WakeOnLan; } WakeOnLan;
int ethtool_connect(int *ret); int ethtool_connect(int *ret);
int ethtool_get_driver(int fd, const char *ifname, char **ret); int ethtool_get_driver(int *fd, const char *ifname, char **ret);
int ethtool_set_speed(int fd, const char *ifname, unsigned int speed, Duple int ethtool_set_speed(int *fd, const char *ifname, unsigned int speed, Dupl
x duplex); ex duplex);
int ethtool_set_wol(int fd, const char *ifname, WakeOnLan wol); int ethtool_set_wol(int *fd, const char *ifname, WakeOnLan wol);
const char *duplex_to_string(Duplex d) _const_; const char *duplex_to_string(Duplex d) _const_;
Duplex duplex_from_string(const char *d) _pure_; Duplex duplex_from_string(const char *d) _pure_;
const char *wol_to_string(WakeOnLan wol) _const_; const char *wol_to_string(WakeOnLan wol) _const_;
WakeOnLan wol_from_string(const char *wol) _pure_; WakeOnLan wol_from_string(const char *wol) _pure_;
int config_parse_duplex(const char *unit, const char *filename, unsigned li ne, const char *section, unsigned section_line, const char *lvalue, int lty pe, const char *rvalue, void *data, void *userdata); int config_parse_duplex(const char *unit, const char *filename, unsigned li ne, const char *section, unsigned section_line, const char *lvalue, int lty pe, const char *rvalue, void *data, void *userdata);
int config_parse_wol(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_wol(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 End of changes. 1 change blocks. 
4 lines changed or deleted 4 lines changed or added


 execute.h   execute.h 
skipping to change at line 28 skipping to change at line 28
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
typedef struct ExecStatus ExecStatus; typedef struct ExecStatus ExecStatus;
typedef struct ExecCommand ExecCommand; typedef struct ExecCommand ExecCommand;
typedef struct ExecContext ExecContext; typedef struct ExecContext ExecContext;
typedef struct ExecRuntime ExecRuntime; typedef struct ExecRuntime ExecRuntime;
typedef struct ExecParameters ExecParameters;
#include <linux/types.h> #include <linux/types.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/resource.h> #include <sys/resource.h>
#include <sys/capability.h> #include <sys/capability.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdio.h> #include <stdio.h>
#include <sched.h> #include <sched.h>
#include "list.h" #include "list.h"
#include "util.h" #include "util.h"
#include "set.h" #include "set.h"
#include "fdset.h" #include "fdset.h"
#include "missing.h" #include "missing.h"
#include "namespace.h" #include "namespace.h"
#include "bus-endpoint.h"
typedef enum ExecInput { typedef enum ExecInput {
EXEC_INPUT_NULL, EXEC_INPUT_NULL,
EXEC_INPUT_TTY, EXEC_INPUT_TTY,
EXEC_INPUT_TTY_FORCE, EXEC_INPUT_TTY_FORCE,
EXEC_INPUT_TTY_FAIL, EXEC_INPUT_TTY_FAIL,
EXEC_INPUT_SOCKET, EXEC_INPUT_SOCKET,
_EXEC_INPUT_MAX, _EXEC_INPUT_MAX,
_EXEC_INPUT_INVALID = -1 _EXEC_INPUT_INVALID = -1
} ExecInput; } ExecInput;
skipping to change at line 190 skipping to change at line 192
bool address_families_whitelist:1; bool address_families_whitelist:1;
char **runtime_directory; char **runtime_directory;
mode_t runtime_directory_mode; mode_t runtime_directory_mode;
bool oom_score_adjust_set:1; bool oom_score_adjust_set:1;
bool nice_set:1; bool nice_set:1;
bool ioprio_set:1; bool ioprio_set:1;
bool cpu_sched_set:1; bool cpu_sched_set:1;
bool no_new_privileges_set:1; bool no_new_privileges_set:1;
/* custom dbus enpoint */
BusEndpoint *bus_endpoint;
}; };
#include "cgroup.h" #include "cgroup.h"
struct ExecParameters {
char **argv;
int *fds; unsigned n_fds;
char **environment;
bool apply_permissions;
bool apply_chroot;
bool apply_tty_stdin;
bool confirm_spawn;
bool selinux_context_net;
CGroupControllerMask cgroup_supported;
const char *cgroup_path;
const char *runtime_prefix;
const char *unit_id;
usec_t watchdog_usec;
int *idle_pipe;
char *bus_endpoint_path;
int bus_endpoint_fd;
};
int exec_spawn(ExecCommand *command, int exec_spawn(ExecCommand *command,
char **argv, const ExecContext *context,
ExecContext *context, const ExecParameters *exec_params,
int fds[], unsigned n_fds,
char **environment,
bool apply_permissions,
bool apply_chroot,
bool apply_tty_stdin,
bool confirm_spawn,
CGroupControllerMask cgroup_mask,
const char *cgroup_path,
const char *runtime_prefix,
const char *unit_id,
usec_t watchdog_usec,
int pipe_fd[2],
ExecRuntime *runtime, ExecRuntime *runtime,
pid_t *ret); pid_t *ret);
void exec_command_done(ExecCommand *c); void exec_command_done(ExecCommand *c);
void exec_command_done_array(ExecCommand *c, unsigned n); void exec_command_done_array(ExecCommand *c, unsigned n);
void exec_command_free_list(ExecCommand *c); void exec_command_free_list(ExecCommand *c);
void exec_command_free_array(ExecCommand **c, unsigned n); void exec_command_free_array(ExecCommand **c, unsigned n);
char *exec_command_line(char **argv); char *exec_command_line(char **argv);
void exec_command_dump(ExecCommand *c, FILE *f, const char *prefix); void exec_command_dump(ExecCommand *c, FILE *f, const char *prefix);
void exec_command_dump_list(ExecCommand *c, FILE *f, const char *prefix); void exec_command_dump_list(ExecCommand *c, FILE *f, const char *prefix);
void exec_command_append_list(ExecCommand **l, ExecCommand *e); void exec_command_append_list(ExecCommand **l, ExecCommand *e);
int exec_command_set(ExecCommand *c, const char *path, ...); int exec_command_set(ExecCommand *c, const char *path, ...);
int exec_command_append(ExecCommand *c, const char *path, ...);
void exec_context_init(ExecContext *c); void exec_context_init(ExecContext *c);
void exec_context_done(ExecContext *c); void exec_context_done(ExecContext *c);
void exec_context_dump(ExecContext *c, FILE* f, const char *prefix); void exec_context_dump(ExecContext *c, FILE* f, const char *prefix);
int exec_context_destroy_runtime_directory(ExecContext *c, const char *runt ime_root); int exec_context_destroy_runtime_directory(ExecContext *c, const char *runt ime_root);
int exec_context_load_environment(const ExecContext *c, char ***l); int exec_context_load_environment(const ExecContext *c, const char *unit_id , char ***l);
bool exec_context_may_touch_console(ExecContext *c); bool exec_context_may_touch_console(ExecContext *c);
void exec_status_start(ExecStatus *s, pid_t pid); void exec_status_start(ExecStatus *s, pid_t pid);
void exec_status_exit(ExecStatus *s, ExecContext *context, pid_t pid, int c ode, int status); void exec_status_exit(ExecStatus *s, ExecContext *context, pid_t pid, int c ode, int status);
void exec_status_dump(ExecStatus *s, FILE *f, const char *prefix); void exec_status_dump(ExecStatus *s, FILE *f, const char *prefix);
int exec_runtime_make(ExecRuntime **rt, ExecContext *c, const char *id); int exec_runtime_make(ExecRuntime **rt, ExecContext *c, const char *id);
ExecRuntime *exec_runtime_ref(ExecRuntime *r); ExecRuntime *exec_runtime_ref(ExecRuntime *r);
ExecRuntime *exec_runtime_unref(ExecRuntime *r); ExecRuntime *exec_runtime_unref(ExecRuntime *r);
 End of changes. 7 change blocks. 
15 lines changed or deleted 28 lines changed or added


 exit-status.h   exit-status.h 
skipping to change at line 42 skipping to change at line 42
EXIT_NOTIMPLEMENTED = 3, EXIT_NOTIMPLEMENTED = 3,
EXIT_NOPERMISSION = 4, EXIT_NOPERMISSION = 4,
EXIT_NOTINSTALLED = 5, EXIT_NOTINSTALLED = 5,
EXIT_NOTCONFIGURED = 6, EXIT_NOTCONFIGURED = 6,
EXIT_NOTRUNNING = 7, EXIT_NOTRUNNING = 7,
/* The LSB suggests that error codes >= 200 are "reserved". We /* The LSB suggests that error codes >= 200 are "reserved". We
* use them here under the assumption that they hence are * use them here under the assumption that they hence are
* unused by init scripts. * unused by init scripts.
* *
* http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB -Core-generic/iniscrptact.html */ * http://refspecs.linuxfoundation.org/LSB_3.2.0/LSB-Core-generic/L SB-Core-generic/iniscrptact.html */
EXIT_CHDIR = 200, EXIT_CHDIR = 200,
EXIT_NICE, EXIT_NICE,
EXIT_FDS, EXIT_FDS,
EXIT_EXEC, EXIT_EXEC,
EXIT_MEMORY, EXIT_MEMORY,
EXIT_LIMITS, EXIT_LIMITS,
EXIT_OOM_ADJUST, EXIT_OOM_ADJUST,
EXIT_SIGNAL_MASK, EXIT_SIGNAL_MASK,
EXIT_STDIN, EXIT_STDIN,
skipping to change at line 80 skipping to change at line 80
EXIT_NAMESPACE, EXIT_NAMESPACE,
EXIT_NO_NEW_PRIVILEGES, EXIT_NO_NEW_PRIVILEGES,
EXIT_SECCOMP, EXIT_SECCOMP,
EXIT_SELINUX_CONTEXT, EXIT_SELINUX_CONTEXT,
EXIT_PERSONALITY, /* 230 */ EXIT_PERSONALITY, /* 230 */
EXIT_APPARMOR_PROFILE, EXIT_APPARMOR_PROFILE,
EXIT_ADDRESS_FAMILIES, EXIT_ADDRESS_FAMILIES,
EXIT_RUNTIME_DIRECTORY, EXIT_RUNTIME_DIRECTORY,
EXIT_MAKE_STARTER, EXIT_MAKE_STARTER,
EXIT_CHOWN, EXIT_CHOWN,
EXIT_BUS_ENDPOINT,
} ExitStatus; } ExitStatus;
typedef enum ExitStatusLevel { typedef enum ExitStatusLevel {
EXIT_STATUS_MINIMAL, EXIT_STATUS_MINIMAL,
EXIT_STATUS_SYSTEMD, EXIT_STATUS_SYSTEMD,
EXIT_STATUS_LSB, EXIT_STATUS_LSB,
EXIT_STATUS_FULL = EXIT_STATUS_LSB EXIT_STATUS_FULL = EXIT_STATUS_LSB
} ExitStatusLevel; } ExitStatusLevel;
typedef struct ExitStatusSet { typedef struct ExitStatusSet {
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 hashmap.h   hashmap.h 
skipping to change at line 37 skipping to change at line 37
#include "util.h" #include "util.h"
/* Pretty straightforward hash table implementation. As a minor /* Pretty straightforward hash table implementation. As a minor
* optimization a NULL hashmap object will be treated as empty hashmap * optimization a NULL hashmap object will be treated as empty hashmap
* for all read operations. That way it is not necessary to * for all read operations. That way it is not necessary to
* instantiate an object for each Hashmap use. */ * instantiate an object for each Hashmap use. */
#define HASH_KEY_SIZE 16 #define HASH_KEY_SIZE 16
typedef struct Hashmap Hashmap; typedef struct Hashmap Hashmap;
typedef struct OrderedHashmap OrderedHashmap;
typedef struct _IteratorStruct _IteratorStruct; typedef struct _IteratorStruct _IteratorStruct;
typedef _IteratorStruct* Iterator; typedef _IteratorStruct* Iterator;
#define ITERATOR_FIRST ((Iterator) 0) #define ITERATOR_FIRST ((Iterator) 0)
#define ITERATOR_LAST ((Iterator) -1) #define ITERATOR_LAST ((Iterator) -1)
typedef unsigned long (*hash_func_t)(const void *p, const uint8_t hash_key[ HASH_KEY_SIZE]); typedef unsigned long (*hash_func_t)(const void *p, const uint8_t hash_key[ HASH_KEY_SIZE]);
typedef int (*compare_func_t)(const void *a, const void *b); typedef int (*compare_func_t)(const void *a, const void *b);
struct hash_ops {
hash_func_t hash;
compare_func_t compare;
};
unsigned long string_hash_func(const void *p, const uint8_t hash_key[HASH_K EY_SIZE]) _pure_; unsigned long string_hash_func(const void *p, const uint8_t hash_key[HASH_K EY_SIZE]) _pure_;
int string_compare_func(const void *a, const void *b) _pure_; int string_compare_func(const void *a, const void *b) _pure_;
extern const struct hash_ops string_hash_ops;
/* This will compare the passed pointers directly, and will not /* This will compare the passed pointers directly, and will not
* dereference them. This is hence not useful for strings or * dereference them. This is hence not useful for strings or
* suchlike. */ * suchlike. */
unsigned long trivial_hash_func(const void *p, const uint8_t hash_key[HASH_ KEY_SIZE]) _pure_; unsigned long trivial_hash_func(const void *p, const uint8_t hash_key[HASH_ KEY_SIZE]) _pure_;
int trivial_compare_func(const void *a, const void *b) _const_; int trivial_compare_func(const void *a, const void *b) _const_;
extern const struct hash_ops trivial_hash_ops;
/* 32bit values we can always just embedd in the pointer itself, but /* 32bit values we can always just embedd in the pointer itself, but
* in order to support 32bit archs we need store 64bit values * in order to support 32bit archs we need store 64bit values
* indirectly, since they don't fit in a pointer. */ * indirectly, since they don't fit in a pointer. */
unsigned long uint64_hash_func(const void *p, const uint8_t hash_key[HASH_K EY_SIZE]) _pure_; unsigned long uint64_hash_func(const void *p, const uint8_t hash_key[HASH_K EY_SIZE]) _pure_;
int uint64_compare_func(const void *a, const void *b) _pure_; int uint64_compare_func(const void *a, const void *b) _pure_;
extern const struct hash_ops uint64_hash_ops;
/* On some archs dev_t is 32bit, and on others 64bit. And sometimes /* On some archs dev_t is 32bit, and on others 64bit. And sometimes
* it's 64bit on 32bit archs, and sometimes 32bit on 64bit archs. Yuck! */ * it's 64bit on 32bit archs, and sometimes 32bit on 64bit archs. Yuck! */
#if SIZEOF_DEV_T != 8 #if SIZEOF_DEV_T != 8
unsigned long devt_hash_func(const void *p, const uint8_t hash_key[HASH_KEY _SIZE]) _pure_; unsigned long devt_hash_func(const void *p, const uint8_t hash_key[HASH_KEY _SIZE]) _pure_;
int devt_compare_func(const void *a, const void *b) _pure_; int devt_compare_func(const void *a, const void *b) _pure_;
extern const struct hash_ops devt_hash_ops = {
.hash = devt_hash_func,
.compare = devt_compare_func
};
#else #else
/* No need to define a second version of this... */
#define devt_hash_func uint64_hash_func #define devt_hash_func uint64_hash_func
#define devt_compare_func uint64_compare_func #define devt_compare_func uint64_compare_func
#define devt_hash_ops uint64_hash_ops
#endif #endif
Hashmap *hashmap_new(hash_func_t hash_func, compare_func_t compare_func); Hashmap *hashmap_new(const struct hash_ops *hash_ops);
static inline OrderedHashmap *ordered_hashmap_new(const struct hash_ops *ha
sh_ops) {
return (OrderedHashmap*) hashmap_new(hash_ops);
}
void hashmap_free(Hashmap *h); void hashmap_free(Hashmap *h);
static inline void ordered_hashmap_free(OrderedHashmap *h) {
hashmap_free((Hashmap*) h);
}
void hashmap_free_free(Hashmap *h); void hashmap_free_free(Hashmap *h);
static inline void ordered_hashmap_free_free(OrderedHashmap *h) {
hashmap_free_free((Hashmap*) h);
}
void hashmap_free_free_free(Hashmap *h); void hashmap_free_free_free(Hashmap *h);
static inline void ordered_hashmap_free_free_free(OrderedHashmap *h) {
hashmap_free_free_free((Hashmap*) h);
}
Hashmap *hashmap_copy(Hashmap *h); Hashmap *hashmap_copy(Hashmap *h);
int hashmap_ensure_allocated(Hashmap **h, hash_func_t hash_func, compare_fu static inline OrderedHashmap *ordered_hashmap_copy(OrderedHashmap *h) {
nc_t compare_func); return (OrderedHashmap*) hashmap_copy((Hashmap*) h);
}
int hashmap_ensure_allocated(Hashmap **h, const struct hash_ops *hash_ops);
static inline int ordered_hashmap_ensure_allocated(OrderedHashmap **h, cons
t struct hash_ops *hash_ops) {
return hashmap_ensure_allocated((Hashmap**) h, hash_ops);
}
int hashmap_put(Hashmap *h, const void *key, void *value); int hashmap_put(Hashmap *h, const void *key, void *value);
static inline int ordered_hashmap_put(OrderedHashmap *h, const void *key, v
oid *value) {
return hashmap_put((Hashmap*) h, key, value);
}
int hashmap_update(Hashmap *h, const void *key, void *value); int hashmap_update(Hashmap *h, const void *key, void *value);
static inline int ordered_hashmap_update(OrderedHashmap *h, const void *key
, void *value) {
return hashmap_update((Hashmap*) h, key, value);
}
int hashmap_replace(Hashmap *h, const void *key, void *value); int hashmap_replace(Hashmap *h, const void *key, void *value);
static inline int ordered_hashmap_replace(OrderedHashmap *h, const void *ke
y, void *value) {
return hashmap_replace((Hashmap*) h, key, value);
}
void *hashmap_get(Hashmap *h, const void *key); void *hashmap_get(Hashmap *h, const void *key);
static inline void *ordered_hashmap_get(OrderedHashmap *h, const void *key)
{
return hashmap_get((Hashmap*) h, key);
}
void *hashmap_get2(Hashmap *h, const void *key, void **rkey); void *hashmap_get2(Hashmap *h, const void *key, void **rkey);
static inline void *ordered_hashmap_get2(OrderedHashmap *h, const void *key
, void **rkey) {
return hashmap_get2((Hashmap*) h, key, rkey);
}
bool hashmap_contains(Hashmap *h, const void *key); bool hashmap_contains(Hashmap *h, const void *key);
static inline bool ordered_hashmap_contains(OrderedHashmap *h, const void *
key) {
return hashmap_contains((Hashmap*) h, key);
}
void *hashmap_remove(Hashmap *h, const void *key); void *hashmap_remove(Hashmap *h, const void *key);
static inline void *ordered_hashmap_remove(OrderedHashmap *h, const void *k
ey) {
return hashmap_remove((Hashmap*) h, key);
}
void *hashmap_remove2(Hashmap *h, const void *key, void **rkey); void *hashmap_remove2(Hashmap *h, const void *key, void **rkey);
static inline void *ordered_hashmap_remove2(OrderedHashmap *h, const void *
key, void **rkey) {
return hashmap_remove2((Hashmap*) h, key, rkey);
}
void *hashmap_remove_value(Hashmap *h, const void *key, void *value); void *hashmap_remove_value(Hashmap *h, const void *key, void *value);
static inline void *ordered_hashmap_remove_value(OrderedHashmap *h, const v
oid *key, void *value) {
return hashmap_remove_value((Hashmap*) h, key, value);
}
int hashmap_remove_and_put(Hashmap *h, const void *old_key, const void *new _key, void *value); int hashmap_remove_and_put(Hashmap *h, const void *old_key, const void *new _key, void *value);
static inline int ordered_hashmap_remove_and_put(OrderedHashmap *h, const v
oid *old_key, const void *new_key, void *value) {
return hashmap_remove_and_put((Hashmap*) h, old_key, new_key, value
);
}
int hashmap_remove_and_replace(Hashmap *h, const void *old_key, const void *new_key, void *value); int hashmap_remove_and_replace(Hashmap *h, const void *old_key, const void *new_key, void *value);
static inline int ordered_hashmap_remove_and_replace(OrderedHashmap *h, con
st void *old_key, const void *new_key, void *value) {
return hashmap_remove_and_replace((Hashmap*) h, old_key, new_key, v
alue);
}
int hashmap_merge(Hashmap *h, Hashmap *other); int hashmap_merge(Hashmap *h, Hashmap *other);
void hashmap_move(Hashmap *h, Hashmap *other); static inline int ordered_hashmap_merge(OrderedHashmap *h, OrderedHashmap *
other) {
return hashmap_merge((Hashmap*) h, (Hashmap*) other);
}
int hashmap_reserve(Hashmap *h, unsigned entries_add);
static inline int ordered_hashmap_reserve(OrderedHashmap *h, unsigned entri
es_add) {
return hashmap_reserve((Hashmap*) h, entries_add);
}
int hashmap_move(Hashmap *h, Hashmap *other);
static inline int ordered_hashmap_move(OrderedHashmap *h, OrderedHashmap *o
ther) {
return hashmap_move((Hashmap*) h, (Hashmap*) other);
}
int hashmap_move_one(Hashmap *h, Hashmap *other, const void *key); int hashmap_move_one(Hashmap *h, Hashmap *other, const void *key);
static inline int ordered_hashmap_move_one(OrderedHashmap *h, OrderedHashma
p *other, const void *key) {
return hashmap_move_one((Hashmap*) h, (Hashmap*) other, key);
}
unsigned hashmap_size(Hashmap *h) _pure_; unsigned hashmap_size(Hashmap *h) _pure_;
static inline unsigned ordered_hashmap_size(OrderedHashmap *h) {
return hashmap_size((Hashmap*) h);
}
bool hashmap_isempty(Hashmap *h) _pure_; bool hashmap_isempty(Hashmap *h) _pure_;
static inline bool ordered_hashmap_isempty(OrderedHashmap *h) {
return hashmap_isempty((Hashmap*) h);
}
unsigned hashmap_buckets(Hashmap *h) _pure_; unsigned hashmap_buckets(Hashmap *h) _pure_;
static inline unsigned ordered_hashmap_buckets(OrderedHashmap *h) {
return hashmap_buckets((Hashmap*) h);
}
void *hashmap_iterate(Hashmap *h, Iterator *i, const void **key); void *hashmap_iterate(Hashmap *h, Iterator *i, const void **key);
void *hashmap_iterate_backwards(Hashmap *h, Iterator *i, const void **key); static inline void *ordered_hashmap_iterate(OrderedHashmap *h, Iterator *i,
void *hashmap_iterate_skip(Hashmap *h, const void *key, Iterator *i); const void **key) {
return hashmap_iterate((Hashmap*) h, i, key);
}
void hashmap_clear(Hashmap *h); void hashmap_clear(Hashmap *h);
static inline void ordered_hashmap_clear(OrderedHashmap *h) {
hashmap_clear((Hashmap*) h);
}
void hashmap_clear_free(Hashmap *h); void hashmap_clear_free(Hashmap *h);
static inline void ordered_hashmap_clear_free(OrderedHashmap *h) {
hashmap_clear_free((Hashmap*) h);
}
void hashmap_clear_free_free(Hashmap *h); void hashmap_clear_free_free(Hashmap *h);
static inline void ordered_hashmap_clear_free_free(OrderedHashmap *h) {
hashmap_clear_free_free((Hashmap*) h);
}
void *hashmap_steal_first(Hashmap *h); void *hashmap_steal_first(Hashmap *h);
static inline void *ordered_hashmap_steal_first(OrderedHashmap *h) {
return hashmap_steal_first((Hashmap*) h);
}
void *hashmap_steal_first_key(Hashmap *h); void *hashmap_steal_first_key(Hashmap *h);
static inline void *ordered_hashmap_steal_first_key(OrderedHashmap *h) {
return hashmap_steal_first_key((Hashmap*) h);
}
void *hashmap_first(Hashmap *h) _pure_; void *hashmap_first(Hashmap *h) _pure_;
static inline void *ordered_hashmap_first(OrderedHashmap *h) {
return hashmap_first((Hashmap*) h);
}
void *hashmap_first_key(Hashmap *h) _pure_; void *hashmap_first_key(Hashmap *h) _pure_;
void *hashmap_last(Hashmap *h) _pure_; static inline void *ordered_hashmap_first_key(OrderedHashmap *h) {
return hashmap_first_key((Hashmap*) h);
}
void *hashmap_next(Hashmap *h, const void *key); void *hashmap_next(Hashmap *h, const void *key);
static inline void *ordered_hashmap_next(OrderedHashmap *h, const void *key
) {
return hashmap_next((Hashmap*) h, key);
}
char **hashmap_get_strv(Hashmap *h); char **hashmap_get_strv(Hashmap *h);
static inline char **ordered_hashmap_get_strv(OrderedHashmap *h) {
return hashmap_get_strv((Hashmap*) h);
}
#define HASHMAP_FOREACH(e, h, i) \ #define HASHMAP_FOREACH(e, h, i) \
for ((i) = ITERATOR_FIRST, (e) = hashmap_iterate((h), &(i), NULL); (e); (e) = hashmap_iterate((h), &(i), NULL)) for ((i) = ITERATOR_FIRST, (e) = hashmap_iterate((h), &(i), NULL); (e); (e) = hashmap_iterate((h), &(i), NULL))
#define ORDERED_HASHMAP_FOREACH(e, h, i) \
for ((i) = ITERATOR_FIRST, (e) = ordered_hashmap_iterate((h), &(i),
NULL); \
(e); \
(e) = ordered_hashmap_iterate((h), &(i), NULL))
#define HASHMAP_FOREACH_KEY(e, k, h, i) \ #define HASHMAP_FOREACH_KEY(e, k, h, i) \
for ((i) = ITERATOR_FIRST, (e) = hashmap_iterate((h), &(i), (const void**) &(k)); (e); (e) = hashmap_iterate((h), &(i), (const void**) &(k))) for ((i) = ITERATOR_FIRST, (e) = hashmap_iterate((h), &(i), (const void**) &(k)); (e); (e) = hashmap_iterate((h), &(i), (const void**) &(k)))
#define HASHMAP_FOREACH_BACKWARDS(e, h, i) \ #define ORDERED_HASHMAP_FOREACH_KEY(e, k, h, i) \
for ((i) = ITERATOR_LAST, (e) = hashmap_iterate_backwards((h), &(i) for ((i) = ITERATOR_FIRST, (e) = ordered_hashmap_iterate((h), &(i),
, NULL); (e); (e) = hashmap_iterate_backwards((h), &(i), NULL)) (const void**) &(k)); \
(e); \
(e) = ordered_hashmap_iterate((h), &(i), (const void**) &(k)))
DEFINE_TRIVIAL_CLEANUP_FUNC(Hashmap*, hashmap_free); DEFINE_TRIVIAL_CLEANUP_FUNC(Hashmap*, hashmap_free);
DEFINE_TRIVIAL_CLEANUP_FUNC(Hashmap*, hashmap_free_free); DEFINE_TRIVIAL_CLEANUP_FUNC(Hashmap*, hashmap_free_free);
DEFINE_TRIVIAL_CLEANUP_FUNC(Hashmap*, hashmap_free_free_free); DEFINE_TRIVIAL_CLEANUP_FUNC(Hashmap*, hashmap_free_free_free);
DEFINE_TRIVIAL_CLEANUP_FUNC(OrderedHashmap*, ordered_hashmap_free);
DEFINE_TRIVIAL_CLEANUP_FUNC(OrderedHashmap*, ordered_hashmap_free_free);
DEFINE_TRIVIAL_CLEANUP_FUNC(OrderedHashmap*, ordered_hashmap_free_free_free
);
#define _cleanup_hashmap_free_ _cleanup_(hashmap_freep) #define _cleanup_hashmap_free_ _cleanup_(hashmap_freep)
#define _cleanup_hashmap_free_free_ _cleanup_(hashmap_free_freep) #define _cleanup_hashmap_free_free_ _cleanup_(hashmap_free_freep)
#define _cleanup_hashmap_free_free_free_ _cleanup_(hashmap_free_free_freep) #define _cleanup_hashmap_free_free_free_ _cleanup_(hashmap_free_free_freep)
#define _cleanup_ordered_hashmap_free_ _cleanup_(ordered_hashmap_freep)
#define _cleanup_ordered_hashmap_free_free_ _cleanup_(ordered_hashmap_free_
freep)
#define _cleanup_ordered_hashmap_free_free_free_ _cleanup_(ordered_hashmap_
free_free_freep)
 End of changes. 43 change blocks. 
11 lines changed or deleted 156 lines changed or added


 in-addr-util.h   in-addr-util.h 
skipping to change at line 43 skipping to change at line 43
int in_addr_is_null(int family, const union in_addr_union *u); int in_addr_is_null(int family, const union in_addr_union *u);
int in_addr_is_link_local(int family, const union in_addr_union *u); int in_addr_is_link_local(int family, const union in_addr_union *u);
int in_addr_equal(int family, const union in_addr_union *a, const union in_ addr_union *b); int in_addr_equal(int family, const union in_addr_union *a, const union in_ addr_union *b);
int in_addr_prefix_intersect(int family, const union in_addr_union *a, unsi gned aprefixlen, const union in_addr_union *b, unsigned bprefixlen); int in_addr_prefix_intersect(int family, const union in_addr_union *a, unsi gned aprefixlen, const union in_addr_union *b, unsigned bprefixlen);
int in_addr_prefix_next(int family, union in_addr_union *u, unsigned prefix len); int in_addr_prefix_next(int family, union in_addr_union *u, unsigned prefix len);
int in_addr_to_string(int family, const union in_addr_union *u, char **ret) ; int in_addr_to_string(int family, const union in_addr_union *u, char **ret) ;
int in_addr_from_string(int family, const char *s, union in_addr_union *ret ); int in_addr_from_string(int family, const char *s, union in_addr_union *ret );
int in_addr_from_string_auto(const char *s, int *family, union in_addr_unio n *ret); int in_addr_from_string_auto(const char *s, int *family, union in_addr_unio n *ret);
unsigned in_addr_netmask_to_prefixlen(const struct in_addr *addr); unsigned in_addr_netmask_to_prefixlen(const struct in_addr *addr);
int in_addr_default_prefixlen(const struct in_addr *addr, unsigned char *pr
efixlen);
int in_addr_default_subnet_mask(const struct in_addr *addr, struct in_addr
*mask);
static inline size_t FAMILY_ADDRESS_SIZE(int family) { static inline size_t FAMILY_ADDRESS_SIZE(int family) {
assert(family == AF_INET || family == AF_INET6); assert(family == AF_INET || family == AF_INET6);
return family == AF_INET6 ? 16 : 4; return family == AF_INET6 ? 16 : 4;
} }
 End of changes. 1 change blocks. 
0 lines changed or deleted 4 lines changed or added


 install.h   install.h 
skipping to change at line 25 skipping to change at line 25
systemd is distributed in the hope that it will be useful, but systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#include "hashmap.h" #include "hashmap.h"
#include "unit-name.h"
typedef enum UnitFileScope { typedef enum UnitFileScope {
UNIT_FILE_SYSTEM, UNIT_FILE_SYSTEM,
UNIT_FILE_GLOBAL, UNIT_FILE_GLOBAL,
UNIT_FILE_USER, UNIT_FILE_USER,
_UNIT_FILE_SCOPE_MAX, _UNIT_FILE_SCOPE_MAX,
_UNIT_FILE_SCOPE_INVALID = -1 _UNIT_FILE_SCOPE_INVALID = -1
} UnitFileScope; } UnitFileScope;
typedef enum UnitFileState { typedef enum UnitFileState {
skipping to change at line 96 skipping to change at line 97
int unit_file_enable(UnitFileScope scope, bool runtime, const char *root_di r, char **files, bool force, UnitFileChange **changes, unsigned *n_changes) ; int unit_file_enable(UnitFileScope scope, bool runtime, const char *root_di r, char **files, bool force, UnitFileChange **changes, unsigned *n_changes) ;
int unit_file_disable(UnitFileScope scope, bool runtime, const char *root_d ir, char **files, UnitFileChange **changes, unsigned *n_changes); int unit_file_disable(UnitFileScope scope, bool runtime, const char *root_d ir, char **files, UnitFileChange **changes, unsigned *n_changes);
int unit_file_reenable(UnitFileScope scope, bool runtime, const char *root_ dir, char **files, bool force, UnitFileChange **changes, unsigned *n_change s); int unit_file_reenable(UnitFileScope scope, bool runtime, const char *root_ dir, char **files, bool force, UnitFileChange **changes, unsigned *n_change s);
int unit_file_link(UnitFileScope scope, bool runtime, const char *root_dir, char **files, bool force, UnitFileChange **changes, unsigned *n_changes); int unit_file_link(UnitFileScope scope, bool runtime, const char *root_dir, char **files, bool force, UnitFileChange **changes, unsigned *n_changes);
int unit_file_preset(UnitFileScope scope, bool runtime, const char *root_di r, char **files, UnitFilePresetMode mode, bool force, UnitFileChange **chan ges, unsigned *n_changes); int unit_file_preset(UnitFileScope scope, bool runtime, const char *root_di r, char **files, UnitFilePresetMode mode, bool force, UnitFileChange **chan ges, unsigned *n_changes);
int unit_file_preset_all(UnitFileScope scope, bool runtime, const char *roo t_dir, UnitFilePresetMode mode, bool force, UnitFileChange **changes, unsig ned *n_changes); int unit_file_preset_all(UnitFileScope scope, bool runtime, const char *roo t_dir, UnitFilePresetMode mode, bool force, UnitFileChange **changes, unsig ned *n_changes);
int unit_file_mask(UnitFileScope scope, bool runtime, const char *root_dir, char **files, bool force, UnitFileChange **changes, unsigned *n_changes); int unit_file_mask(UnitFileScope scope, bool runtime, const char *root_dir, char **files, bool force, UnitFileChange **changes, unsigned *n_changes);
int unit_file_unmask(UnitFileScope scope, bool runtime, const char *root_di r, char **files, UnitFileChange **changes, unsigned *n_changes); int unit_file_unmask(UnitFileScope scope, bool runtime, const char *root_di r, char **files, UnitFileChange **changes, unsigned *n_changes);
int unit_file_set_default(UnitFileScope scope, const char *root_dir, const char *file, bool force, UnitFileChange **changes, unsigned *n_changes); int unit_file_set_default(UnitFileScope scope, const char *root_dir, const char *file, bool force, UnitFileChange **changes, unsigned *n_changes);
int unit_file_get_default(UnitFileScope scope, const char *root_dir, char * *name); int unit_file_get_default(UnitFileScope scope, const char *root_dir, char * *name);
int unit_file_add_dependency(UnitFileScope scope, bool runtime, const char *root_dir, char **files, char *target, UnitDependency dep, bool force, Unit FileChange **changes, unsigned *n_changes);
UnitFileState unit_file_get_state(UnitFileScope scope, const char *root_dir , const char *filename); UnitFileState unit_file_get_state(UnitFileScope scope, const char *root_dir , const char *filename);
int unit_file_get_list(UnitFileScope scope, const char *root_dir, Hashmap * h); int unit_file_get_list(UnitFileScope scope, const char *root_dir, Hashmap * h);
void unit_file_list_free(Hashmap *h); void unit_file_list_free(Hashmap *h);
void unit_file_changes_free(UnitFileChange *changes, unsigned n_changes); void unit_file_changes_free(UnitFileChange *changes, unsigned n_changes);
int unit_file_query_preset(UnitFileScope scope, const char *root_dir, const char *name); int unit_file_query_preset(UnitFileScope scope, const char *root_dir, const char *name);
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added


 journal-file.h   journal-file.h 
skipping to change at line 79 skipping to change at line 79
Header *header; Header *header;
HashItem *data_hash_table; HashItem *data_hash_table;
HashItem *field_hash_table; HashItem *field_hash_table;
uint64_t current_offset; uint64_t current_offset;
JournalMetrics metrics; JournalMetrics metrics;
MMapCache *mmap; MMapCache *mmap;
Hashmap *chain_cache; OrderedHashmap *chain_cache;
#ifdef HAVE_XZ #if defined(HAVE_XZ) || defined(HAVE_LZ4)
void *compress_buffer; void *compress_buffer;
size_t compress_buffer_size; size_t compress_buffer_size;
#endif #endif
#ifdef HAVE_GCRYPT #ifdef HAVE_GCRYPT
gcry_md_hd_t hmac; gcry_md_hd_t hmac;
bool hmac_running; bool hmac_running;
FSSHeader *fss_file; FSSHeader *fss_file;
size_t fss_file_size; size_t fss_file_size;
skipping to change at line 214 skipping to change at line 214
int journal_file_get_cutoff_realtime_usec(JournalFile *f, usec_t *from, use c_t *to); int journal_file_get_cutoff_realtime_usec(JournalFile *f, usec_t *from, use c_t *to);
int journal_file_get_cutoff_monotonic_usec(JournalFile *f, sd_id128_t boot, usec_t *from, usec_t *to); int journal_file_get_cutoff_monotonic_usec(JournalFile *f, sd_id128_t boot, usec_t *from, usec_t *to);
bool journal_file_rotate_suggested(JournalFile *f, usec_t max_file_usec); bool journal_file_rotate_suggested(JournalFile *f, usec_t max_file_usec);
static unsigned type_to_context(int type) { static unsigned type_to_context(int type) {
/* One context for each type, plus one catch-all for the rest */ /* One context for each type, plus one catch-all for the rest */
return type > 0 && type < _OBJECT_TYPE_MAX ? type : 0; return type > 0 && type < _OBJECT_TYPE_MAX ? type : 0;
} }
static inline int journal_file_object_keep(JournalFile *f, Object *o, uint6 4_t offset) { static inline int journal_file_object_keep(JournalFile *f, Object *o, uint6 4_t offset, void **release_cookie) {
unsigned context = type_to_context(o->object.type); unsigned context = type_to_context(o->object.type);
uint64_t s = le64toh(o->object.size);
return mmap_cache_get(f->mmap, f->fd, f->prot, context, true, return mmap_cache_get(f->mmap, f->fd, f->prot, context, true,
offset, o->object.size, &f->last_stat, NULL); offset, s, &f->last_stat, NULL, release_cooki e);
} }
static inline int journal_file_object_release(JournalFile *f, Object *o, ui static inline int journal_file_object_release(JournalFile *f, void *release
nt64_t offset) { _cookie) {
unsigned context = type_to_context(o->object.type); return mmap_cache_release(f->mmap, f->fd, release_cookie);
return mmap_cache_release(f->mmap, f->fd, f->prot, context,
offset, o->object.size);
} }
 End of changes. 6 change blocks. 
10 lines changed or deleted 8 lines changed or added


 journal-internal.h   journal-internal.h 
skipping to change at line 103 skipping to change at line 103
struct Directory { struct Directory {
char *path; char *path;
int wd; int wd;
bool is_root; bool is_root;
}; };
struct sd_journal { struct sd_journal {
char *path; char *path;
char *prefix; char *prefix;
Hashmap *files; OrderedHashmap *files;
MMapCache *mmap; MMapCache *mmap;
Location current_location; Location current_location;
JournalFile *current_file; JournalFile *current_file;
uint64_t current_field; uint64_t current_field;
Match *level0, *level1, *level2; Match *level0, *level1, *level2;
pid_t original_pid; pid_t original_pid;
skipping to change at line 127 skipping to change at line 127
usec_t last_process_usec; usec_t last_process_usec;
char *unique_field; char *unique_field;
JournalFile *unique_file; JournalFile *unique_file;
uint64_t unique_offset; uint64_t unique_offset;
int flags; int flags;
bool on_network; bool on_network;
bool no_new_files; bool no_new_files;
bool unique_file_lost; /* File we were iterating over got
removed, and there were no more
files, so sd_j_enumerate_unique
will return a value equal to 0. */
size_t data_threshold; size_t data_threshold;
Hashmap *directories_by_path; Hashmap *directories_by_path;
Hashmap *directories_by_wd; Hashmap *directories_by_wd;
Set *errors; Set *errors;
}; };
char *journal_make_match_string(sd_journal *j); char *journal_make_match_string(sd_journal *j);
 End of changes. 2 change blocks. 
1 lines changed or deleted 5 lines changed or added


 journald-server.h   journald-server.h 
skipping to change at line 79 skipping to change at line 79
sd_event_source *dev_kmsg_event_source; sd_event_source *dev_kmsg_event_source;
sd_event_source *sync_event_source; sd_event_source *sync_event_source;
sd_event_source *sigusr1_event_source; sd_event_source *sigusr1_event_source;
sd_event_source *sigusr2_event_source; sd_event_source *sigusr2_event_source;
sd_event_source *sigterm_event_source; sd_event_source *sigterm_event_source;
sd_event_source *sigint_event_source; sd_event_source *sigint_event_source;
sd_event_source *hostname_event_source; sd_event_source *hostname_event_source;
JournalFile *runtime_journal; JournalFile *runtime_journal;
JournalFile *system_journal; JournalFile *system_journal;
Hashmap *user_journals; OrderedHashmap *user_journals;
uint64_t seqnum; uint64_t seqnum;
char *buffer; char *buffer;
size_t buffer_size; size_t buffer_size;
JournalRateLimit *rate_limit; JournalRateLimit *rate_limit;
usec_t sync_interval_usec; usec_t sync_interval_usec;
usec_t rate_limit_interval; usec_t rate_limit_interval;
unsigned rate_limit_burst; unsigned rate_limit_burst;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 kdbus.h   kdbus.h 
/* /*
* Copyright (C) 2013 Kay Sievers
* Copyright (C) 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Copyright (C) 2013 Linux Foundation
* Copyright (C) 2013 Lennart Poettering
* Copyright (C) 2013 Daniel Mack <daniel@zonque.org>
*
* kdbus is free software; you can redistribute it and/or modify it under * kdbus 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 * 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 * Free Software Foundation; either version 2.1 of the License, or (at
* your option) any later version. * your option) any later version.
*
* "Everything should be made as simple as possible, but not simpler."
* -- Albert Einstein
*/ */
#ifndef _KDBUS_H_ #ifndef _KDBUS_UAPI_H_
#define _KDBUS_H_ #define _KDBUS_UAPI_H_
#ifndef __KERNEL__ #include <linux/ioctl.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <linux/types.h> #include <linux/types.h>
#endif
#define KDBUS_IOCTL_MAGIC 0x95 #define KDBUS_IOCTL_MAGIC 0x95
#define KDBUS_SRC_ID_KERNEL (0) #define KDBUS_SRC_ID_KERNEL (0)
#define KDBUS_DST_ID_NAME (0) #define KDBUS_DST_ID_NAME (0)
#define KDBUS_MATCH_ID_ANY (~0ULL) #define KDBUS_MATCH_ID_ANY (~0ULL)
#define KDBUS_DST_ID_BROADCAST (~0ULL) #define KDBUS_DST_ID_BROADCAST (~0ULL)
#define KDBUS_FLAG_KERNEL (1ULL << 63)
/** /**
* struct kdbus_notify_id_change - name registry change message * struct kdbus_notify_id_change - name registry change message
* @id: New or former owner of the name * @id: New or former owner of the name
* @flags: flags field from KDBUS_HELLO_* * @flags: flags field from KDBUS_HELLO_*
* *
* Sent from kernel to userspace when the owner or activator of * Sent from kernel to userspace when the owner or activator of
* a well-known name changes. * a well-known name changes.
* *
* Attached to: * Attached to:
* KDBUS_ITEM_ID_ADD * KDBUS_ITEM_ID_ADD
* KDBUS_ITEM_ID_REMOVE * KDBUS_ITEM_ID_REMOVE
*/ */
struct kdbus_notify_id_change { struct kdbus_notify_id_change {
__u64 id; __u64 id;
__u64 flags; __u64 flags;
}; };
/** /**
* struct kdbus_notify_name_change - name registry change message * struct kdbus_notify_name_change - name registry change message
* @old: ID and flags of former owner of a name * @old_id: ID and flags of former owner of a name
* @new: ID and flags of new owner of a name * @new_id: ID and flags of new owner of a name
* @name: Well-known name * @name: Well-known name
* *
* Sent from kernel to userspace when the owner or activator of * Sent from kernel to userspace when the owner or activator of
* a well-known name changes. * a well-known name changes.
* *
* Attached to: * Attached to:
* KDBUS_ITEM_NAME_ADD * KDBUS_ITEM_NAME_ADD
* KDBUS_ITEM_NAME_REMOVE * KDBUS_ITEM_NAME_REMOVE
* KDBUS_ITEM_NAME_CHANGE * KDBUS_ITEM_NAME_CHANGE
*/ */
struct kdbus_notify_name_change { struct kdbus_notify_name_change {
struct kdbus_notify_id_change old; struct kdbus_notify_id_change old_id;
struct kdbus_notify_id_change new; struct kdbus_notify_id_change new_id;
char name[0]; char name[0];
}; };
/** /**
* struct kdbus_creds - process credentials * struct kdbus_creds - process credentials
* @uid: User ID * @uid: User ID
* @gid: Group ID * @gid: Group ID
* @pid: Process ID * @pid: Process ID
* @tid: Thread ID * @tid: Thread ID
* @starttime: Starttime of the process * @starttime: Starttime of the process
skipping to change at line 94 skipping to change at line 83
*/ */
struct kdbus_creds { struct kdbus_creds {
__u64 uid; __u64 uid;
__u64 gid; __u64 gid;
__u64 pid; __u64 pid;
__u64 tid; __u64 tid;
__u64 starttime; __u64 starttime;
}; };
/** /**
* struct kdbus_caps - process capabilities
* @last_cap: Highest currently known capability bit
* @caps: Variable number of 32-bit capabilities flags
*
* Contains a variable number of 32-bit capabilities flags.
*
* Attached to:
* KDBUS_ITEM_CAPS
*/
struct kdbus_caps {
__u32 last_cap;
__u32 caps[0];
};
/**
* struct kdbus_audit - audit information * struct kdbus_audit - audit information
* @sessionid: The audit session ID * @sessionid: The audit session ID
* @loginuid: The audit login uid * @loginuid: The audit login uid
* *
* Attached to: * Attached to:
* KDBUS_ITEM_AUDIT * KDBUS_ITEM_AUDIT
*/ */
struct kdbus_audit { struct kdbus_audit {
__u64 sessionid; __u64 sessionid;
__u64 loginuid; __u64 loginuid;
skipping to change at line 124 skipping to change at line 128
*/ */
struct kdbus_timestamp { struct kdbus_timestamp {
__u64 seqnum; __u64 seqnum;
__u64 monotonic_ns; __u64 monotonic_ns;
__u64 realtime_ns; __u64 realtime_ns;
}; };
/** /**
* struct kdbus_vec - I/O vector for kdbus payload items * struct kdbus_vec - I/O vector for kdbus payload items
* @size: The size of the vector * @size: The size of the vector
* @address: Memory address for memory addresses * @address: Memory address of data buffer
* @offset: Offset in the in-message payload memory, * @offset: Offset in the in-message payload memory,
* relative to the message head * relative to the message head
* *
* Attached to: * Attached to:
* KDBUS_ITEM_PAYLOAD_VEC * KDBUS_ITEM_PAYLOAD_VEC, KDBUS_ITEM_PAYLOAD_OFF
*/ */
struct kdbus_vec { struct kdbus_vec {
__u64 size; __u64 size;
union { union {
__u64 address; __u64 address;
__u64 offset; __u64 offset;
}; };
}; };
/** /**
skipping to change at line 163 skipping to change at line 167
*/ */
struct kdbus_bloom_filter { struct kdbus_bloom_filter {
__u64 generation; __u64 generation;
__u64 data[0]; __u64 data[0];
}; };
/** /**
* struct kdbus_memfd - a kdbus memfd * struct kdbus_memfd - a kdbus memfd
* @size: The memfd's size * @size: The memfd's size
* @fd: The file descriptor number * @fd: The file descriptor number
* @__pad: Padding to ensure proper alignement and size * @__pad: Padding to ensure proper alignment and size
* *
* Attached to: * Attached to:
* KDBUS_ITEM_PAYLOAD_MEMFD * KDBUS_ITEM_PAYLOAD_MEMFD
*/ */
struct kdbus_memfd { struct kdbus_memfd {
__u64 size; __u64 size;
int fd; int fd;
__u32 __pad; __u32 __pad;
}; };
skipping to change at line 218 skipping to change at line 222
* @KDBUS_ITEM_BLOOM_PARAMETER: Bus-wide bloom parameters, used with * @KDBUS_ITEM_BLOOM_PARAMETER: Bus-wide bloom parameters, used with
* KDBUS_CMD_BUS_MAKE, carries a * KDBUS_CMD_BUS_MAKE, carries a
* struct kdbus_bloom_parameter * struct kdbus_bloom_parameter
* @KDBUS_ITEM_BLOOM_FILTER: Bloom filter carried with a message, used to * @KDBUS_ITEM_BLOOM_FILTER: Bloom filter carried with a message, used to
* match against a bloom mask of a connection, * match against a bloom mask of a connection,
* carries a struct kdbus_bloom_filter * carries a struct kdbus_bloom_filter
* @KDBUS_ITEM_BLOOM_MASK: Bloom mask used to match against a message's * @KDBUS_ITEM_BLOOM_MASK: Bloom mask used to match against a message's
* bloom filter * bloom filter
* @KDBUS_ITEM_DST_NAME: Destination's well-known name * @KDBUS_ITEM_DST_NAME: Destination's well-known name
* @KDBUS_ITEM_MAKE_NAME: Name of domain, bus, endpoint * @KDBUS_ITEM_MAKE_NAME: Name of domain, bus, endpoint
* @KDBUS_ITEM_MEMFD_NAME: The human readable name of a memfd (debuggin g)
* @KDBUS_ITEM_ATTACH_FLAGS: Attach-flags, used for updating which metada ta * @KDBUS_ITEM_ATTACH_FLAGS: Attach-flags, used for updating which metada ta
* a connection subscribes to * a connection subscribes to
* @_KDBUS_ITEM_ATTACH_BASE: Start of metadata attach items * @_KDBUS_ITEM_ATTACH_BASE: Start of metadata attach items
* @KDBUS_ITEM_NAME: Well-know name with flags * @KDBUS_ITEM_NAME: Well-know name with flags
* @KDBUS_ITEM_ID: Connection ID * @KDBUS_ITEM_ID: Connection ID
* @KDBUS_ITEM_TIMESTAMP: Timestamp * @KDBUS_ITEM_TIMESTAMP: Timestamp
* @KDBUS_ITEM_CREDS: Process credential * @KDBUS_ITEM_CREDS: Process credential
* @KDBUS_ITEM_AUXGROUPS: Auxiliary process groups * @KDBUS_ITEM_AUXGROUPS: Auxiliary process groups
* @KDBUS_ITEM_PID_COMM: Process ID "comm" identifier * @KDBUS_ITEM_PID_COMM: Process ID "comm" identifier
* @KDBUS_ITEM_TID_COMM: Thread ID "comm" identifier * @KDBUS_ITEM_TID_COMM: Thread ID "comm" identifier
skipping to change at line 259 skipping to change at line 262
_KDBUS_ITEM_USER_BASE, _KDBUS_ITEM_USER_BASE,
KDBUS_ITEM_PAYLOAD_VEC = _KDBUS_ITEM_USER_BASE, KDBUS_ITEM_PAYLOAD_VEC = _KDBUS_ITEM_USER_BASE,
KDBUS_ITEM_PAYLOAD_OFF, KDBUS_ITEM_PAYLOAD_OFF,
KDBUS_ITEM_PAYLOAD_MEMFD, KDBUS_ITEM_PAYLOAD_MEMFD,
KDBUS_ITEM_FDS, KDBUS_ITEM_FDS,
KDBUS_ITEM_BLOOM_PARAMETER, KDBUS_ITEM_BLOOM_PARAMETER,
KDBUS_ITEM_BLOOM_FILTER, KDBUS_ITEM_BLOOM_FILTER,
KDBUS_ITEM_BLOOM_MASK, KDBUS_ITEM_BLOOM_MASK,
KDBUS_ITEM_DST_NAME, KDBUS_ITEM_DST_NAME,
KDBUS_ITEM_MAKE_NAME, KDBUS_ITEM_MAKE_NAME,
KDBUS_ITEM_MEMFD_NAME,
KDBUS_ITEM_ATTACH_FLAGS, KDBUS_ITEM_ATTACH_FLAGS,
_KDBUS_ITEM_ATTACH_BASE = 0x1000, _KDBUS_ITEM_ATTACH_BASE = 0x1000,
KDBUS_ITEM_NAME = _KDBUS_ITEM_ATTACH_BASE, KDBUS_ITEM_NAME = _KDBUS_ITEM_ATTACH_BASE,
KDBUS_ITEM_ID, KDBUS_ITEM_ID,
KDBUS_ITEM_TIMESTAMP, KDBUS_ITEM_TIMESTAMP,
KDBUS_ITEM_CREDS, KDBUS_ITEM_CREDS,
KDBUS_ITEM_AUXGROUPS, KDBUS_ITEM_AUXGROUPS,
KDBUS_ITEM_PID_COMM, KDBUS_ITEM_PID_COMM,
KDBUS_ITEM_TID_COMM, KDBUS_ITEM_TID_COMM,
skipping to change at line 328 skipping to change at line 330
union { union {
__u8 data[0]; __u8 data[0];
__u32 data32[0]; __u32 data32[0];
__u64 data64[0]; __u64 data64[0];
char str[0]; char str[0];
__u64 id; __u64 id;
struct kdbus_vec vec; struct kdbus_vec vec;
struct kdbus_creds creds; struct kdbus_creds creds;
struct kdbus_audit audit; struct kdbus_audit audit;
struct kdbus_caps caps;
struct kdbus_timestamp timestamp; struct kdbus_timestamp timestamp;
struct kdbus_name name; struct kdbus_name name;
struct kdbus_bloom_parameter bloom_parameter; struct kdbus_bloom_parameter bloom_parameter;
struct kdbus_bloom_filter bloom_filter; struct kdbus_bloom_filter bloom_filter;
struct kdbus_memfd memfd; struct kdbus_memfd memfd;
int fds[0]; int fds[0];
struct kdbus_notify_name_change name_change; struct kdbus_notify_name_change name_change;
struct kdbus_notify_id_change id_change; struct kdbus_notify_id_change id_change;
struct kdbus_policy_access policy_access; struct kdbus_policy_access policy_access;
}; };
skipping to change at line 361 skipping to change at line 364
* offset_reply in struct kdbus_msg wil l * offset_reply in struct kdbus_msg wil l
* yield the offset in the sender's poo l * yield the offset in the sender's poo l
* where the reply can be found. * where the reply can be found.
* This flag is only valid if * This flag is only valid if
* @KDBUS_MSG_FLAGS_EXPECT_REPLY is set as * @KDBUS_MSG_FLAGS_EXPECT_REPLY is set as
* well. * well.
* @KDBUS_MSG_FLAGS_NO_AUTO_START: Do not start a service, if the addre ssed * @KDBUS_MSG_FLAGS_NO_AUTO_START: Do not start a service, if the addre ssed
* name is not currently active * name is not currently active
*/ */
enum kdbus_msg_flags { enum kdbus_msg_flags {
KDBUS_MSG_FLAGS_EXPECT_REPLY = 1 << 0, KDBUS_MSG_FLAGS_EXPECT_REPLY = 1ULL << 0,
KDBUS_MSG_FLAGS_SYNC_REPLY = 1 << 1, KDBUS_MSG_FLAGS_SYNC_REPLY = 1ULL << 1,
KDBUS_MSG_FLAGS_NO_AUTO_START = 1 << 2, KDBUS_MSG_FLAGS_NO_AUTO_START = 1ULL << 2,
}; };
/** /**
* enum kdbus_payload_type - type of payload carried by message * enum kdbus_payload_type - type of payload carried by message
* @KDBUS_PAYLOAD_KERNEL: Kernel-generated simple message * @KDBUS_PAYLOAD_KERNEL: Kernel-generated simple message
* @KDBUS_PAYLOAD_DBUS: D-Bus marshalling "DBusDBus" * @KDBUS_PAYLOAD_DBUS: D-Bus marshalling "DBusDBus"
*/ */
enum kdbus_payload_type { enum kdbus_payload_type {
KDBUS_PAYLOAD_KERNEL, KDBUS_PAYLOAD_KERNEL,
KDBUS_PAYLOAD_DBUS = 0x4442757344427573ULL, KDBUS_PAYLOAD_DBUS = 0x4442757344427573ULL,
}; };
/** /**
* struct kdbus_msg - the representation of a kdbus message * struct kdbus_msg - the representation of a kdbus message
* @size: Total size of the message * @size: Total size of the message
* @flags: Message flags (KDBUS_MSG_FLAGS_*) * @flags: Message flags (KDBUS_MSG_FLAGS_*), userspace → ker
nel
* @kernel_flags: Supported message flags, kernel → userspace
* @priority: Message queue priority value * @priority: Message queue priority value
* @dst_id: 64-bit ID of the destination connection * @dst_id: 64-bit ID of the destination connection
* @src_id: 64-bit ID of the source connection * @src_id: 64-bit ID of the source connection
* @payload_type: Payload type (KDBUS_PAYLOAD_*) * @payload_type: Payload type (KDBUS_PAYLOAD_*)
* @cookie: Userspace-supplied cookie, for the connection * @cookie: Userspace-supplied cookie, for the connection
* to identify its messages * to identify its messages
* @timeout_ns: The time to wait for a message reply from th e peer. * @timeout_ns: The time to wait for a message reply from th e peer.
* If there is no reply, a kernel-generated message * If there is no reply, a kernel-generated message
* with an attached KDBUS_ITEM_REPLY_TIMEOUT item * with an attached KDBUS_ITEM_REPLY_TIMEOUT item
* is sent to @src_id. * is sent to @src_id. The timeout is expected in
* nanoseconds and as absolute CLOCK_MONOTONIC value.
* @cookie_reply: A reply to the requesting message with the same * @cookie_reply: A reply to the requesting message with the same
* cookie. The requesting connection can match its * cookie. The requesting connection can match its
* request and the reply with this value * request and the reply with this value
* @offset_reply: If KDBUS_MSG_FLAGS_EXPECT_REPLY, this field will * @offset_reply: If KDBUS_MSG_FLAGS_EXPECT_REPLY, this field will
* contain the offset in the sender's pool where the * contain the offset in the sender's pool where the
* reply is stored. * reply is stored.
* @items: A list of kdbus_items containing the message payload * @items: A list of kdbus_items containing the message payload
*/ */
struct kdbus_msg { struct kdbus_msg {
__u64 size; __u64 size;
__u64 flags; __u64 flags;
__u64 kernel_flags;
__s64 priority; __s64 priority;
__u64 dst_id; __u64 dst_id;
__u64 src_id; __u64 src_id;
__u64 payload_type; __u64 payload_type;
__u64 cookie; __u64 cookie;
union { union {
__u64 timeout_ns; __u64 timeout_ns;
__u64 cookie_reply; __u64 cookie_reply;
__u64 offset_reply; __u64 offset_reply;
}; };
skipping to change at line 428 skipping to change at line 434
* any file descriptors or other resources. It is * any file descriptors or other resources. It is
* usually used to determine the activating * usually used to determine the activating
* connection of a bus name. * connection of a bus name.
* @KDBUS_RECV_DROP: Drop and free the next queued message and al l * @KDBUS_RECV_DROP: Drop and free the next queued message and al l
* its resources without actually receiving it. * its resources without actually receiving it.
* @KDBUS_RECV_USE_PRIORITY: Only de-queue messages with the specified or * @KDBUS_RECV_USE_PRIORITY: Only de-queue messages with the specified or
* higher priority (lowest values); if not set, * higher priority (lowest values); if not set,
* the priority value is ignored. * the priority value is ignored.
*/ */
enum kdbus_recv_flags { enum kdbus_recv_flags {
KDBUS_RECV_PEEK = 1 << 0, KDBUS_RECV_PEEK = 1ULL << 0,
KDBUS_RECV_DROP = 1 << 1, KDBUS_RECV_DROP = 1ULL << 1,
KDBUS_RECV_USE_PRIORITY = 1 << 2, KDBUS_RECV_USE_PRIORITY = 1ULL << 2,
}; };
/** /**
* struct kdbus_cmd_recv - struct to de-queue a buffered message * struct kdbus_cmd_recv - struct to de-queue a buffered message
* @flags: KDBUS_RECV_* flags * @flags: KDBUS_RECV_* flags, userspace → kernel
* @kernel_flags: Supported KDBUS_RECV_* flags, kernel → userspace
* @priority: Minimum priority of the messages to de-queue. Lowest * @priority: Minimum priority of the messages to de-queue. Lowest
* values have the highest priority. * values have the highest priority.
* @offset: Returned offset in the pool where the message is * @offset: Returned offset in the pool where the message is
* stored. The user must use KDBUS_CMD_FREE to free * stored. The user must use KDBUS_CMD_FREE to free
* the allocated memory. * the allocated memory.
* *
* This struct is used with the KDBUS_CMD_MSG_RECV ioctl. * This struct is used with the KDBUS_CMD_MSG_RECV ioctl.
*/ */
struct kdbus_cmd_recv { struct kdbus_cmd_recv {
__u64 flags; __u64 flags;
__u64 kernel_flags;
__s64 priority; __s64 priority;
__u64 offset; __u64 offset;
} __attribute__((aligned(8))); } __attribute__((aligned(8)));
/** /**
* struct kdbus_cmd_cancel - struct to cancel a synchronously pending messa
ge
* @cookie The cookie of the pending message
* @flags Flags for the free command. Currently unused.
*
* This struct is used with the KDBUS_CMD_CANCEL ioctl.
*/
struct kdbus_cmd_cancel {
__u64 cookie;
__u64 flags;
} __attribute__((aligned(8)));
/**
* struct kdbus_cmd_free - struct to free a slice of memory in the pool
* @offset: The offset of the memory slice, as returned by other
* ioctls
* @flags: Flags for the free command, userspace → kernel
* @kernel_flags: Supported flags of the free command, userspace → k
ernel
*
* This struct is used with the KDBUS_CMD_FREE ioctl.
*/
struct kdbus_cmd_free {
__u64 offset;
__u64 flags;
__u64 kernel_flags;
} __attribute__((aligned(8)));
/**
* enum kdbus_policy_access_type - permissions of a policy record * enum kdbus_policy_access_type - permissions of a policy record
* @_KDBUS_POLICY_ACCESS_NULL: Uninitialized/invalid * @_KDBUS_POLICY_ACCESS_NULL: Uninitialized/invalid
* @KDBUS_POLICY_ACCESS_USER: Grant access to a uid * @KDBUS_POLICY_ACCESS_USER: Grant access to a uid
* @KDBUS_POLICY_ACCESS_GROUP: Grant access to gid * @KDBUS_POLICY_ACCESS_GROUP: Grant access to gid
* @KDBUS_POLICY_ACCESS_WORLD: World-accessible * @KDBUS_POLICY_ACCESS_WORLD: World-accessible
*/ */
enum kdbus_policy_access_type { enum kdbus_policy_access_type {
_KDBUS_POLICY_ACCESS_NULL, _KDBUS_POLICY_ACCESS_NULL,
KDBUS_POLICY_ACCESS_USER, KDBUS_POLICY_ACCESS_USER,
KDBUS_POLICY_ACCESS_GROUP, KDBUS_POLICY_ACCESS_GROUP,
skipping to change at line 480 skipping to change at line 515
* @KDBUS_POLICY_SEE: Allow to see a well-known name * @KDBUS_POLICY_SEE: Allow to see a well-known name
*/ */
enum kdbus_policy_type { enum kdbus_policy_type {
KDBUS_POLICY_SEE = 0, KDBUS_POLICY_SEE = 0,
KDBUS_POLICY_TALK, KDBUS_POLICY_TALK,
KDBUS_POLICY_OWN, KDBUS_POLICY_OWN,
}; };
/** /**
* enum kdbus_hello_flags - flags for struct kdbus_cmd_hello * enum kdbus_hello_flags - flags for struct kdbus_cmd_hello
* @KDBUS_HELLO_ACCEPT_FD: The connection allows the receiving of * @KDBUS_HELLO_ACCEPT_FD: The connection allows the reception of
* any passed file descriptors * any passed file descriptors
* @KDBUS_HELLO_ACTIVATOR: Special-purpose connection which registers * @KDBUS_HELLO_ACTIVATOR: Special-purpose connection which registers
* a well-know name for a process to be started * a well-know name for a process to be started
* when traffic arrives * when traffic arrives
* @KDBUS_HELLO_POLICY_HOLDER: Special-purpose connection which registers * @KDBUS_HELLO_POLICY_HOLDER: Special-purpose connection which registers
* policy entries for a name. The provided name * policy entries for a name. The provided name
* is not activated and not registered with the * is not activated and not registered with the
* name database, it only allows unprivileged * name database, it only allows unprivileged
* connections to aquire a name, talk or discov er * connections to aquire a name, talk or discov er
* a service * a service
* @KDBUS_HELLO_MONITOR: Special-purpose connection to monitor * @KDBUS_HELLO_MONITOR: Special-purpose connection to monitor
* bus traffic * bus traffic
*/ */
enum kdbus_hello_flags { enum kdbus_hello_flags {
KDBUS_HELLO_ACCEPT_FD = 1 << 0, KDBUS_HELLO_ACCEPT_FD = 1ULL << 0,
KDBUS_HELLO_ACTIVATOR = 1 << 1, KDBUS_HELLO_ACTIVATOR = 1ULL << 1,
KDBUS_HELLO_POLICY_HOLDER = 1 << 2, KDBUS_HELLO_POLICY_HOLDER = 1ULL << 2,
KDBUS_HELLO_MONITOR = 1 << 3, KDBUS_HELLO_MONITOR = 1ULL << 3,
}; };
/** /**
* enum kdbus_attach_flags - flags for metadata attachments * enum kdbus_attach_flags - flags for metadata attachments
* @KDBUS_ATTACH_TIMESTAMP: Timestamp * @KDBUS_ATTACH_TIMESTAMP: Timestamp
* @KDBUS_ATTACH_CREDS: Credentials * @KDBUS_ATTACH_CREDS: Credentials
* @KDBUS_ATTACH_AUXGROUPS: Auxiliary groups * @KDBUS_ATTACH_AUXGROUPS: Auxiliary groups
* @KDBUS_ATTACH_NAMES: Well-known names * @KDBUS_ATTACH_NAMES: Well-known names
* @KDBUS_ATTACH_COMM: The "comm" process identifier * @KDBUS_ATTACH_COMM_TID: The "comm" process identifier of the TID
* @KDBUS_ATTACH_COMM_PID: The "comm" process identifier of the PID
* @KDBUS_ATTACH_EXE: The path of the executable * @KDBUS_ATTACH_EXE: The path of the executable
* @KDBUS_ATTACH_CMDLINE: The process command line * @KDBUS_ATTACH_CMDLINE: The process command line
* @KDBUS_ATTACH_CGROUP: The croup membership * @KDBUS_ATTACH_CGROUP: The croup membership
* @KDBUS_ATTACH_CAPS: The process capabilities * @KDBUS_ATTACH_CAPS: The process capabilities
* @KDBUS_ATTACH_SECLABEL: The security label * @KDBUS_ATTACH_SECLABEL: The security label
* @KDBUS_ATTACH_AUDIT: The audit IDs * @KDBUS_ATTACH_AUDIT: The audit IDs
* @KDBUS_ATTACH_CONN_NAME: The human-readable connection name * @KDBUS_ATTACH_CONN_NAME: The human-readable connection name
* @_KDBUS_ATTACH_ALL: All of the above * @_KDBUS_ATTACH_ALL: All of the above
*/ */
enum kdbus_attach_flags { enum kdbus_attach_flags {
KDBUS_ATTACH_TIMESTAMP = 1 << 0, KDBUS_ATTACH_TIMESTAMP = 1ULL << 0,
KDBUS_ATTACH_CREDS = 1 << 1, KDBUS_ATTACH_CREDS = 1ULL << 1,
KDBUS_ATTACH_AUXGROUPS = 1 << 2, KDBUS_ATTACH_AUXGROUPS = 1ULL << 2,
KDBUS_ATTACH_NAMES = 1 << 3, KDBUS_ATTACH_NAMES = 1ULL << 3,
KDBUS_ATTACH_COMM = 1 << 4, KDBUS_ATTACH_TID_COMM = 1ULL << 4,
KDBUS_ATTACH_EXE = 1 << 5, KDBUS_ATTACH_PID_COMM = 1ULL << 5,
KDBUS_ATTACH_CMDLINE = 1 << 6, KDBUS_ATTACH_EXE = 1ULL << 6,
KDBUS_ATTACH_CGROUP = 1 << 7, KDBUS_ATTACH_CMDLINE = 1ULL << 7,
KDBUS_ATTACH_CAPS = 1 << 8, KDBUS_ATTACH_CGROUP = 1ULL << 8,
KDBUS_ATTACH_SECLABEL = 1 << 9, KDBUS_ATTACH_CAPS = 1ULL << 9,
KDBUS_ATTACH_AUDIT = 1 << 10, KDBUS_ATTACH_SECLABEL = 1ULL << 10,
KDBUS_ATTACH_CONN_NAME = 1 << 11, KDBUS_ATTACH_AUDIT = 1ULL << 11,
_KDBUS_ATTACH_ALL = (1 << 12) - 1, KDBUS_ATTACH_CONN_NAME = 1ULL << 12,
_KDBUS_ATTACH_ALL = (1ULL << 13) - 1,
}; };
/** /**
* struct kdbus_cmd_hello - struct to say hello to kdbus * struct kdbus_cmd_hello - struct to say hello to kdbus
* @size: The total size of the structure * @size: The total size of the structure
* @conn_flags: Connection flags (KDBUS_HELLO_*). The kernel * @flags: Connection flags (KDBUS_HELLO_*), userspace → kern
will el
* return its capabilities in that field. * @kernel_flags: Supported connection flags, kernel → userspace
* @attach_flags: Mask of metadata to attach to each message sent * @attach_flags: Mask of metadata to attach to each message sent
* (KDBUS_ATTACH_*) * (KDBUS_ATTACH_*)
* @bus_flags: The flags field copied verbatim from the original * @bus_flags: The flags field copied verbatim from the original
* KDBUS_CMD_BUS_MAKE ioctl. It's intended to be useful * KDBUS_CMD_BUS_MAKE ioctl. It's intended to be useful
* to do negotiation of features of the payload that is * to do negotiation of features of the payload that is
* transferred (kernel → userspace) * transferred (kernel → userspace)
* @id: The ID of this connection (kernel → usersp ace) * @id: The ID of this connection (kernel → usersp ace)
* @pool_size: Size of the connection's buffer where the received * @pool_size: Size of the connection's buffer where the received
* messages are placed * messages are placed
* @bloom: The bloom properties of the bus, specified * @bloom: The bloom properties of the bus, specified
* by the bus creator (kernel → userspace) * by the bus creator (kernel → userspace)
* @id128: Unique 128-bit ID of the bus (kernel → userspace) * @id128: Unique 128-bit ID of the bus (kernel → userspace)
* @items: A list of items * @items: A list of items
* *
* This struct is used with the KDBUS_CMD_HELLO ioctl. * This struct is used with the KDBUS_CMD_HELLO ioctl.
*/ */
struct kdbus_cmd_hello { struct kdbus_cmd_hello {
__u64 size; __u64 size;
__u64 conn_flags; __u64 flags;
__u64 kernel_flags;
__u64 attach_flags; __u64 attach_flags;
__u64 bus_flags; __u64 bus_flags;
__u64 id; __u64 id;
__u64 pool_size; __u64 pool_size;
struct kdbus_bloom_parameter bloom; struct kdbus_bloom_parameter bloom;
__u8 id128[16]; __u8 id128[16];
struct kdbus_item items[0]; struct kdbus_item items[0];
} __attribute__((aligned(8))); } __attribute__((aligned(8)));
/** /**
* enum kdbus_make_flags - Flags for KDBUS_CMD_{BUS,EP,NS}_MAKE * enum kdbus_make_flags - Flags for KDBUS_CMD_{BUS,EP,NS}_MAKE
* @KDBUS_MAKE_ACCESS_GROUP: Make the device node group-accessible * @KDBUS_MAKE_ACCESS_GROUP: Make the device node group-accessible
* @KDBUS_MAKE_ACCESS_WORLD: Make the device node world-accessible * @KDBUS_MAKE_ACCESS_WORLD: Make the device node world-accessible
*/ */
enum kdbus_make_flags { enum kdbus_make_flags {
KDBUS_MAKE_ACCESS_GROUP = 1 << 0, KDBUS_MAKE_ACCESS_GROUP = 1ULL << 0,
KDBUS_MAKE_ACCESS_WORLD = 1 << 1, KDBUS_MAKE_ACCESS_WORLD = 1ULL << 1,
}; };
/** /**
* struct kdbus_cmd_make - struct to make a bus, an endpoint or a domain * struct kdbus_cmd_make - struct to make a bus, an endpoint or a domain
* @size: The total size of the struct * @size: The total size of the struct
* @flags: Properties for the bus/ep/domain to create * @flags: Properties for the bus/ep/domain to create,
* userspace → kernel
* @kernel_flags: Supported flags for the used command, kernel → use
rspace
* @items: Items describing details * @items: Items describing details
* *
* This structure is used with the KDBUS_CMD_BUS_MAKE, KDBUS_CMD_EP_MAKE an * This structure is used with the KDBUS_CMD_BUS_MAKE, KDBUS_CMD_ENDPOINT_M
d AKE
* KDBUS_CMD_DOMAIN_MAKE ioctls. * and KDBUS_CMD_DOMAIN_MAKE ioctls.
*/ */
struct kdbus_cmd_make { struct kdbus_cmd_make {
__u64 size; __u64 size;
__u64 flags; __u64 flags;
__u64 kernel_flags;
struct kdbus_item items[0]; struct kdbus_item items[0];
} __attribute__((aligned(8))); } __attribute__((aligned(8)));
/** /**
* enum kdbus_name_flags - properties of a well-known name * enum kdbus_name_flags - properties of a well-known name
* @KDBUS_NAME_REPLACE_EXISTING: Try to replace name of other connect ions * @KDBUS_NAME_REPLACE_EXISTING: Try to replace name of other connect ions
* @KDBUS_NAME_ALLOW_REPLACEMENT: Allow the replacement of the name * @KDBUS_NAME_ALLOW_REPLACEMENT: Allow the replacement of the name
* @KDBUS_NAME_QUEUE: Name should be queued if busy * @KDBUS_NAME_QUEUE: Name should be queued if busy
* @KDBUS_NAME_IN_QUEUE: Name is queued * @KDBUS_NAME_IN_QUEUE: Name is queued
* @KDBUS_NAME_ACTIVATOR: Name is owned by a activator connect ion * @KDBUS_NAME_ACTIVATOR: Name is owned by a activator connect ion
*/ */
enum kdbus_name_flags { enum kdbus_name_flags {
KDBUS_NAME_REPLACE_EXISTING = 1 << 0, KDBUS_NAME_REPLACE_EXISTING = 1ULL << 0,
KDBUS_NAME_ALLOW_REPLACEMENT = 1 << 1, KDBUS_NAME_ALLOW_REPLACEMENT = 1ULL << 1,
KDBUS_NAME_QUEUE = 1 << 2, KDBUS_NAME_QUEUE = 1ULL << 2,
KDBUS_NAME_IN_QUEUE = 1 << 3, KDBUS_NAME_IN_QUEUE = 1ULL << 3,
KDBUS_NAME_ACTIVATOR = 1 << 4, KDBUS_NAME_ACTIVATOR = 1ULL << 4,
}; };
/** /**
* struct kdbus_cmd_name - struct to describe a well-known name * struct kdbus_cmd_name - struct to describe a well-known name
* @size: The total size of the struct * @size: The total size of the struct
* @flags: Flags for a name entry (KDBUS_NAME_*) * @flags: Flags for a name entry (KDBUS_NAME_*),
* @owner_id: The current owner of the name. * userspace → kernel, kernel → userspace
* @conn_flags: The flags of the owning connection (KDBUS_HE * @kernel_flags: Supported flags for a name entry, kernel → userspa
LLO_*) ce
* @name: The well-known name * @items: Item list, containing the well-known name as
* KDBUS_ITEM_NAME
* *
* This structure is used with the KDBUS_CMD_NAME_ACQUIRE ioctl. * This structure is used with the KDBUS_CMD_NAME_ACQUIRE ioctl.
*/ */
struct kdbus_cmd_name { struct kdbus_cmd_name {
__u64 size; __u64 size;
__u64 flags; __u64 flags;
__u64 owner_id; __u64 kernel_flags;
struct kdbus_item items[0];
} __attribute__((aligned(8)));
/**
* struct kdbus_name_info - struct to describe a well-known name
* @size: The total size of the struct
* @flags: Flags for a name entry (KDBUS_NAME_*),
* @conn_flags: The flags of the owning connection (KDBUS_HE
LLO_*)
* @owner_id: The current owner of the name
* @items: Item list, containing the well-known name as
* KDBUS_ITEM_NAME
*
* This structure is used as return struct for the KDBUS_CMD_NAME_LIST ioct
l.
*/
struct kdbus_name_info {
__u64 size;
__u64 flags;
__u64 conn_flags; __u64 conn_flags;
char name[0]; __u64 owner_id;
struct kdbus_item items[0];
} __attribute__((aligned(8))); } __attribute__((aligned(8)));
/** /**
* enum kdbus_name_list_flags - what to include into the returned list * enum kdbus_name_list_flags - what to include into the returned list
* @KDBUS_NAME_LIST_UNIQUE: All active connections * @KDBUS_NAME_LIST_UNIQUE: All active connections
* @KDBUS_NAME_LIST_NAMES: All known well-known names * @KDBUS_NAME_LIST_NAMES: All known well-known names
* @KDBUS_NAME_LIST_ACTIVATORS: All activator connections * @KDBUS_NAME_LIST_ACTIVATORS: All activator connections
* @KDBUS_NAME_LIST_QUEUED: All queued-up names * @KDBUS_NAME_LIST_QUEUED: All queued-up names
*/ */
enum kdbus_name_list_flags { enum kdbus_name_list_flags {
KDBUS_NAME_LIST_UNIQUE = 1 << 0, KDBUS_NAME_LIST_UNIQUE = 1ULL << 0,
KDBUS_NAME_LIST_NAMES = 1 << 1, KDBUS_NAME_LIST_NAMES = 1ULL << 1,
KDBUS_NAME_LIST_ACTIVATORS = 1 << 2, KDBUS_NAME_LIST_ACTIVATORS = 1ULL << 2,
KDBUS_NAME_LIST_QUEUED = 1 << 3, KDBUS_NAME_LIST_QUEUED = 1ULL << 3,
}; };
/** /**
* struct kdbus_cmd_name_list - request a list of name entries * struct kdbus_cmd_name_list - request a list of name entries
* @flags: Flags for the query (KDBUS_NAME_LIST_*) * @flags: Flags for the query (KDBUS_NAME_LIST_*),
* userspace → kernel
* @kernel_flags: Supported flags for queries, kernel → userspace
* @offset: The returned offset in the caller's pool buffer. * @offset: The returned offset in the caller's pool buffer.
* The user must use KDBUS_CMD_FREE to free the * The user must use KDBUS_CMD_FREE to free the
* allocated memory. * allocated memory.
* *
* This structure is used with the KDBUS_CMD_NAME_LIST ioctl. * This structure is used with the KDBUS_CMD_NAME_LIST ioctl.
*/ */
struct kdbus_cmd_name_list { struct kdbus_cmd_name_list {
__u64 flags; __u64 flags;
__u64 kernel_flags;
__u64 offset; __u64 offset;
} __attribute__((aligned(8))); } __attribute__((aligned(8)));
/** /**
* struct kdbus_name_list - information returned by KDBUS_CMD_NAME_LIST * struct kdbus_name_list - information returned by KDBUS_CMD_NAME_LIST
* @size: The total size of the structure * @size: The total size of the structure
* @names: A list of names * @names: A list of names
* *
* Note that the user is responsible for freeing the allocated memory with * Note that the user is responsible for freeing the allocated memory with
* the KDBUS_CMD_FREE ioctl. * the KDBUS_CMD_FREE ioctl.
*/ */
struct kdbus_name_list { struct kdbus_name_list {
__u64 size; __u64 size;
struct kdbus_cmd_name names[0]; struct kdbus_name_info names[0];
}; };
/** /**
* struct kdbus_cmd_conn_info - struct used for KDBUS_CMD_CONN_INFO ioctl * struct kdbus_cmd_info - struct used for KDBUS_CMD_CONN_INFO ioctl
* @size: The total size of the struct * @size: The total size of the struct
* @flags: KDBUS_ATTACH_* flags * @flags: KDBUS_ATTACH_* flags, userspace → kernel
* @kernel_flags: Supported KDBUS_ATTACH_* flags, kernel → userspace
* @id: The 64-bit ID of the connection. If set to z ero, passing * @id: The 64-bit ID of the connection. If set to z ero, passing
* @name is required. kdbus will look up the name to * @name is required. kdbus will look up the name to
* determine the ID in this case. * determine the ID in this case.
* @offset: Returned offset in the caller's pool buffer where th e * @offset: Returned offset in the caller's pool buffer where th e
* kdbus_conn_info struct result is stored. The user mu st * kdbus_info struct result is stored. The user must
* use KDBUS_CMD_FREE to free the allocated memory. * use KDBUS_CMD_FREE to free the allocated memory.
* @name: The optional well-known name to look up. Only needed * @items: The optional item list, containing the
in * well-known name to look up as a KDBUS_ITEM_NAME.
* case @id is zero. * Only needed in case @id is zero.
* *
* On success, the KDBUS_CMD_CONN_INFO ioctl will return 0 and @offset will * On success, the KDBUS_CMD_CONN_INFO ioctl will return 0 and @offset will
* tell the user the offset in the connection pool buffer at which to find the * tell the user the offset in the connection pool buffer at which to find the
* result in a struct kdbus_conn_info. * result in a struct kdbus_info.
*/ */
struct kdbus_cmd_conn_info { struct kdbus_cmd_info {
__u64 size; __u64 size;
__u64 flags; __u64 flags;
__u64 kernel_flags;
__u64 id; __u64 id;
__u64 offset; __u64 offset;
char name[0]; struct kdbus_item items[0];
} __attribute__((aligned(8))); } __attribute__((aligned(8)));
/** /**
* struct kdbus_conn_info - information returned by KDBUS_CMD_CONN_INFO * struct kdbus_info - information returned by KDBUS_CMD_*_INFO
* @size: The total size of the struct * @size: The total size of the struct
* @id: The connection's 64-bit ID * @id: The connection's or bus' 64-bit ID
* @flags: The connection's flags * @flags: The connection's or bus' flags
* @items: A list of struct kdbus_item * @items: A list of struct kdbus_item
* *
* Note that the user is responsible for freeing the allocated memory with * Note that the user is responsible for freeing the allocated memory with
* the KDBUS_CMD_FREE ioctl. * the KDBUS_CMD_FREE ioctl.
*/ */
struct kdbus_conn_info { struct kdbus_info {
__u64 size; __u64 size;
__u64 id; __u64 id;
__u64 flags; __u64 flags;
struct kdbus_item items[0]; struct kdbus_item items[0];
}; };
/** /**
* struct kdbus_cmd_update - update flags of a connection * struct kdbus_cmd_update - update flags of a connection
* @size: The total size of the struct * @size: The total size of the struct
* @flags: Flags for the update command, userspace → kernel
* @kernel_flags: Supported flags for this command, kernel → userspa
ce
* @items: A list of struct kdbus_item * @items: A list of struct kdbus_item
* *
* This struct is used with the KDBUS_CMD_CONN_UPDATE ioctl. * This struct is used with the KDBUS_CMD_CONN_UPDATE ioctl.
*/ */
struct kdbus_cmd_update { struct kdbus_cmd_update {
__u64 size; __u64 size;
__u64 flags;
__u64 kernel_flags;
struct kdbus_item items[0]; struct kdbus_item items[0];
} __attribute__((aligned(8))); } __attribute__((aligned(8)));
/** /**
* enum kdbus_cmd_match_flags - flags to control the KDBUS_CMD_MATCH_ADD io
ctl
* @KDBUS_MATCH_REPLACE: If entries with the supplied cookie already
* exists, remove them before installing the ne
w
* matches.
*/
enum kdbus_cmd_match_flags {
KDBUS_MATCH_REPLACE = 1ULL << 0,
};
/**
* struct kdbus_cmd_match - struct to add or remove matches * struct kdbus_cmd_match - struct to add or remove matches
* @size: The total size of the struct * @size: The total size of the struct
* @cookie: Userspace supplied cookie. When removing, the cookie * @cookie: Userspace supplied cookie. When removing, the cookie
* identifies the match to remove * identifies the match to remove
* @flags: Flags for match command (KDBUS_MATCH_*),
* userspace → kernel
* @kernel_flags: Supported flags of the used command, kernel → user
space
* @items: A list of items for additional information * @items: A list of items for additional information
* *
* This structure is used with the KDBUS_CMD_ADD_MATCH and * This structure is used with the KDBUS_CMD_MATCH_ADD and
* KDBUS_CMD_REMOVE_MATCH ioctl. * KDBUS_CMD_MATCH_REMOVE ioctl.
*/ */
struct kdbus_cmd_match { struct kdbus_cmd_match {
__u64 size; __u64 size;
__u64 cookie; __u64 cookie;
__u64 flags;
__u64 kernel_flags;
struct kdbus_item items[0]; struct kdbus_item items[0];
} __attribute__((aligned(8))); } __attribute__((aligned(8)));
/** /**
* enum kdbus_ioctl_type - Ioctl API * enum kdbus_ioctl_type - Ioctl API
* @KDBUS_CMD_BUS_MAKE: After opening the "control" device n ode, this * @KDBUS_CMD_BUS_MAKE: After opening the "control" device n ode, this
* command creates a new bus with the specified * command creates a new bus with the specified
* name. The bus is immediately shut down and * name. The bus is immediately shut down and
* cleaned up when the opened "control" device node * cleaned up when the opened "control" device node
* is closed. * is closed.
* @KDBUS_CMD_DOMAIN_MAKE: Similar to KDBUS_CMD_BUS_MAKE, but it create s a * @KDBUS_CMD_DOMAIN_MAKE: Similar to KDBUS_CMD_BUS_MAKE, but it create s a
* new kdbus domain. * new kdbus domain.
* @KDBUS_CMD_EP_MAKE: Creates a new named special endpoint to talk to * @KDBUS_CMD_ENDPOINT_MAKE: Creates a new named special endpoint to talk to
* the bus. Such endpoints usually carry a more * the bus. Such endpoints usually carry a more
* restrictive policy and grant restricted acce ss * restrictive policy and grant restricted acce ss
* to specific applications. * to specific applications.
* @KDBUS_CMD_HELLO: By opening the bus device node a connection is * @KDBUS_CMD_HELLO: By opening the bus device node a connection is
* created. After a HELLO the opened connection * created. After a HELLO the opened connection
* becomes an active peer on the bus. * becomes an active peer on the bus.
* @KDBUS_CMD_BYEBYE: Disconnect a connection. If the connection's * @KDBUS_CMD_BYEBYE: Disconnect a connection. If there are no
* message list is empty, the calls succeeds, a * messages queued up in the connection's pool,
nd * the call succeeds, and the handle is rendere
* the handle is rendered unusable. Otherwise, d
* -EAGAIN is returned without any further side * unusable. Otherwise, -EBUSY is returned with
- out
* effects. * any further side-effects.
* @KDBUS_CMD_MSG_SEND: Send a message and pass data from us erspace to * @KDBUS_CMD_MSG_SEND: Send a message and pass data from us erspace to
* the kernel. * the kernel.
* @KDBUS_CMD_MSG_RECV: Receive a message from the kernel wh ich is * @KDBUS_CMD_MSG_RECV: Receive a message from the kernel wh ich is
* placed in the receiver's pool. * placed in the receiver's pool.
* @KDBUS_CMD_MSG_CANCEL: Cancel a pending request of a message that * @KDBUS_CMD_MSG_CANCEL: Cancel a pending request of a message that
* blocks while waiting for a reply. The parame ter * blocks while waiting for a reply. The parame ter
* denotes the cookie of the message in flight. * denotes the cookie of the message in flight.
* @KDBUS_CMD_FREE: Release the allocated memory in the receiver 's * @KDBUS_CMD_FREE: Release the allocated memory in the receiver 's
* pool. * pool.
* @KDBUS_CMD_NAME_ACQUIRE: Request a well-known bus name to associate w ith * @KDBUS_CMD_NAME_ACQUIRE: Request a well-known bus name to associate w ith
skipping to change at line 781 skipping to change at line 866
* @KDBUS_CMD_NAME_LIST: Retrieve the list of all currently registere d * @KDBUS_CMD_NAME_LIST: Retrieve the list of all currently registere d
* well-known and unique names. * well-known and unique names.
* @KDBUS_CMD_CONN_INFO: Retrieve credentials and properties of the * @KDBUS_CMD_CONN_INFO: Retrieve credentials and properties of the
* initial creator of the connection. The data was * initial creator of the connection. The data was
* stored at registration time and does not * stored at registration time and does not
* necessarily represent the connected process or * necessarily represent the connected process or
* the actual state of the process. * the actual state of the process.
* @KDBUS_CMD_CONN_UPDATE: Update the properties of a connection. Used to * @KDBUS_CMD_CONN_UPDATE: Update the properties of a connection. Used to
* update the metadata subscription mask and * update the metadata subscription mask and
* policy. * policy.
* @KDBUS_CMD_EP_UPDATE: Update the properties of a custom enpoint. U * @KDBUS_CMD_BUS_CREATOR_INFO: Retrieve information of the creator
sed of the bus
* a connection is attached to.
* @KDBUS_CMD_ENDPOINT_UPDATE: Update the properties of a custom enpoint. U
sed
* to update the policy. * to update the policy.
* @KDBUS_CMD_MATCH_ADD: Install a match which broadcast messages sho uld * @KDBUS_CMD_MATCH_ADD: Install a match which broadcast messages sho uld
* be delivered to the connection. * be delivered to the connection.
* @KDBUS_CMD_MATCH_REMOVE: Remove a current match for broadcast message s. * @KDBUS_CMD_MATCH_REMOVE: Remove a current match for broadcast message s.
*/ */
enum kdbus_ioctl_type { enum kdbus_ioctl_type {
KDBUS_CMD_BUS_MAKE = _IOW(KDBUS_IOCTL_MAGIC, 0x00, KDBUS_CMD_BUS_MAKE = _IOW(KDBUS_IOCTL_MAGIC, 0x00,
struct kdbus_cmd_make), struct kdbus_cmd_make),
KDBUS_CMD_DOMAIN_MAKE = _IOW(KDBUS_IOCTL_MAGIC, 0x10, KDBUS_CMD_DOMAIN_MAKE = _IOW(KDBUS_IOCTL_MAGIC, 0x10,
struct kdbus_cmd_make), struct kdbus_cmd_make),
KDBUS_CMD_EP_MAKE = _IOW(KDBUS_IOCTL_MAGIC, 0x20, KDBUS_CMD_ENDPOINT_MAKE = _IOW(KDBUS_IOCTL_MAGIC, 0x20,
struct kdbus_cmd_make), struct kdbus_cmd_make),
KDBUS_CMD_HELLO = _IOWR(KDBUS_IOCTL_MAGIC, 0x30, KDBUS_CMD_HELLO = _IOWR(KDBUS_IOCTL_MAGIC, 0x30,
struct kdbus_cmd_hello), struct kdbus_cmd_hello),
KDBUS_CMD_BYEBYE = _IO(KDBUS_IOCTL_MAGIC, 0x31), KDBUS_CMD_BYEBYE = _IO(KDBUS_IOCTL_MAGIC, 0x31),
KDBUS_CMD_MSG_SEND = _IOWR(KDBUS_IOCTL_MAGIC, 0x40, KDBUS_CMD_MSG_SEND = _IOWR(KDBUS_IOCTL_MAGIC, 0x40,
struct kdbus_msg), struct kdbus_msg),
KDBUS_CMD_MSG_RECV = _IOWR(KDBUS_IOCTL_MAGIC, 0x41, KDBUS_CMD_MSG_RECV = _IOWR(KDBUS_IOCTL_MAGIC, 0x41,
struct kdbus_cmd_recv), struct kdbus_cmd_recv),
KDBUS_CMD_MSG_CANCEL = _IOW(KDBUS_IOCTL_MAGIC, 0x42, __u64 KDBUS_CMD_MSG_CANCEL = _IOW(KDBUS_IOCTL_MAGIC, 0x42,
*), struct kdbus_cmd_cancel),
KDBUS_CMD_FREE = _IOW(KDBUS_IOCTL_MAGIC, 0x43, __u64 KDBUS_CMD_FREE = _IOW(KDBUS_IOCTL_MAGIC, 0x43,
*), struct kdbus_cmd_free),
KDBUS_CMD_NAME_ACQUIRE = _IOWR(KDBUS_IOCTL_MAGIC, 0x50, KDBUS_CMD_NAME_ACQUIRE = _IOWR(KDBUS_IOCTL_MAGIC, 0x50,
struct kdbus_cmd_name), struct kdbus_cmd_name),
KDBUS_CMD_NAME_RELEASE = _IOW(KDBUS_IOCTL_MAGIC, 0x51, KDBUS_CMD_NAME_RELEASE = _IOW(KDBUS_IOCTL_MAGIC, 0x51,
struct kdbus_cmd_name), struct kdbus_cmd_name),
KDBUS_CMD_NAME_LIST = _IOWR(KDBUS_IOCTL_MAGIC, 0x52, KDBUS_CMD_NAME_LIST = _IOWR(KDBUS_IOCTL_MAGIC, 0x52,
struct kdbus_cmd_name_list), struct kdbus_cmd_name_list),
KDBUS_CMD_CONN_INFO = _IOWR(KDBUS_IOCTL_MAGIC, 0x60, KDBUS_CMD_CONN_INFO = _IOWR(KDBUS_IOCTL_MAGIC, 0x60,
struct kdbus_cmd_conn_info), struct kdbus_cmd_info),
KDBUS_CMD_CONN_UPDATE = _IOW(KDBUS_IOCTL_MAGIC, 0x61, KDBUS_CMD_CONN_UPDATE = _IOW(KDBUS_IOCTL_MAGIC, 0x61,
struct kdbus_cmd_update), struct kdbus_cmd_update),
KDBUS_CMD_BUS_CREATOR_INFO = _IOWR(KDBUS_IOCTL_MAGIC, 0x62,
struct kdbus_cmd_info),
KDBUS_CMD_EP_UPDATE = _IOW(KDBUS_IOCTL_MAGIC, 0x71, KDBUS_CMD_ENDPOINT_UPDATE = _IOW(KDBUS_IOCTL_MAGIC, 0x71,
struct kdbus_cmd_update), struct kdbus_cmd_update),
KDBUS_CMD_MATCH_ADD = _IOW(KDBUS_IOCTL_MAGIC, 0x80, KDBUS_CMD_MATCH_ADD = _IOW(KDBUS_IOCTL_MAGIC, 0x80,
struct kdbus_cmd_match), struct kdbus_cmd_match),
KDBUS_CMD_MATCH_REMOVE = _IOW(KDBUS_IOCTL_MAGIC, 0x81, KDBUS_CMD_MATCH_REMOVE = _IOW(KDBUS_IOCTL_MAGIC, 0x81,
struct kdbus_cmd_match), struct kdbus_cmd_match),
}; };
/* #endif /* _KDBUS_UAPI_H_ */
* errno - api error codes
* @E2BIG: A message contains too many records or items.
* @EADDRINUSE: A well-known bus name is already taken by an
other
* connection.
* @EADDRNOTAVAIL: A message flagged not to activate a service, address
ed
* a service which is not currently running.
* @EAGAIN: No messages are queued at the moment.
* @EALREADY: A requested name is already owned by the connection,
* a connection is already disconnected, memfd is alrea
dy
* sealed or has the requested size.
* @EBADF: File descriptors passed with the message are not val
id.
* @EBADFD: A bus connection is in a corrupted state.
* @EBADMSG: Passed data contains a combination of conflicting or
* inconsistent types.
* @EBUSY: The user tried to say BYEBYE to a connection, but th
e
* connection had a non-empty message list.
* @ECANCELED: A synchronous message sending was cancelled.
* @ECONNRESET: A connection is shut down, no further operat
ions are
* possible.
* @ECOMM: A peer does not accept the file descriptors addresse
d
* to it.
* @EDESTADDRREQ: The well-known bus name is required but missing.
* @EDOM: The size of data does not match the expectations. Us
ed
* for bloom bit field sizes.
* @EEXIST: A requested domain, bus or endpoint with the same
* name already exists. A specific data type, which is
* only expected once, is provided multiple times.
* @EFAULT: The supplied memory could not be accessed, the data
* is not properly aligned, or the current task's memor
y
* is inaccessible.
* @EINVAL: The provided data does not match its type or other
* expectations, like a string which is not NUL termina
ted,
* or a string length that points behind the first
* \0-byte in the string.
* @EMEDIUMTYPE: A file descriptor which is not a kdbus memfd was
* refused to send as KDBUS_MSG_PAYLOAD_MEMFD.
* @EMFILE: Too many file descriptors have been supplied with a
* message.
* Too many connections or buses are created for a give
n
* user.
* @EMLINK: Too many requests from this connection to other peer
s
* are queued and waiting for a reply
* @EMSGSIZE: The supplied data is larger than the allowed maximum
* size.
* @ENAMETOOLONG: The requested name is larger than the allowed maximu
m
* size.
* @ENOBUFS: There is no space left for the submitted data to fit
* into the receiver's pool.
* @ENOENT: The to be cancelled message was not found.
* @ENOMEM: Out of memory.
* @ENOMSG: The queue is not empty, but no message with a matchi
ng
* priority is currently queued.
* @ENOSYS: The requested functionality is not available.
* @ENOTTY: An unknown ioctl command was received.
* @ENOTUNIQ: A specific data type was addressed to a broadcast
* address, but only direct addresses support this kind
of
* data.
* @ENXIO: A unique address does not exist, or an offset in the
* receiver's pool does not represent a queued message.
* @EOPNOTSUPP: The feature negotiation failed, a not suppor
ted feature
* was requested, or an unknown item type was received.
* @EPERM: The policy prevented an operation. The requested
* resource is owned by another entity.
* @EPIPE: When sending a message, a synchronous reply from the
* receiving connection was expected but the connection
* died before answering.
* @ESHUTDOWN: A domain, bus or endpoint is currently shutting down
;
* no further operations will be possible.
* @ESRCH: A requested well-known bus name is not found.
* @ETIMEDOUT: A synchronous wait for a message reply did not arriv
e
* within the specified time frame.
* @ETXTBSY: A kdbus memfd file cannot be sealed or the seal remo
ved,
* because it is shared with other processes or still
* mmap()ed.
* @EXFULL: The size limits in the pool are reached, no data of
* the size tried to submit can be queued.
*/
#endif
 End of changes. 68 change blocks. 
113 lines changed or deleted 212 lines changed or added


 label.h   label.h 
skipping to change at line 24 skipping to change at line 24
systemd is distributed in the hope that it will be useful, but systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#include <sys/types.h> #include "selinux-util.h"
#include <stdbool.h> #include "smack-util.h"
#include <sys/socket.h>
int label_init(const char *prefix);
void label_finish(void);
int label_fix(const char *path, bool ignore_enoent, bool ignore_erofs); int label_fix(const char *path, bool ignore_enoent, bool ignore_erofs);
int label_socket_set(const char *label); int mkdir_label(const char *path, mode_t mode);
void label_socket_clear(void); int symlink_label(const char *old_path, const char *new_path);
int label_context_set(const char *path, mode_t mode);
void label_context_clear(void);
void label_free(const char *label);
int label_get_create_label_from_exe(const char *exe, char **label);
int label_mkdir(const char *path, mode_t mode);
int label_bind(int fd, const struct sockaddr *addr, socklen_t addrlen);
int label_apply(const char *path, const char *label);
int label_write_one_line_file_atomic(const char *fn, const char *line);
int label_write_env_file(const char *fname, char **l);
int label_fopen_temporary(const char *path, FILE **_f, char **_temp_path);
 End of changes. 2 change blocks. 
6 lines changed or deleted 2 lines changed or added


 libudev-private.h   libudev-private.h 
skipping to change at line 62 skipping to change at line 62
struct udev_list_entry *udev_add_property(struct udev *udev, const char *ke y, const char *value); struct udev_list_entry *udev_add_property(struct udev *udev, const char *ke y, const char *value);
struct udev_list_entry *udev_get_properties_list_entry(struct udev *udev); struct udev_list_entry *udev_get_properties_list_entry(struct udev *udev);
/* libudev-device.c */ /* libudev-device.c */
struct udev_device *udev_device_new(struct udev *udev); struct udev_device *udev_device_new(struct udev *udev);
mode_t udev_device_get_devnode_mode(struct udev_device *udev_device); mode_t udev_device_get_devnode_mode(struct udev_device *udev_device);
uid_t udev_device_get_devnode_uid(struct udev_device *udev_device); uid_t udev_device_get_devnode_uid(struct udev_device *udev_device);
gid_t udev_device_get_devnode_gid(struct udev_device *udev_device); gid_t udev_device_get_devnode_gid(struct udev_device *udev_device);
int udev_device_set_subsystem(struct udev_device *udev_device, const char * subsystem); int udev_device_set_subsystem(struct udev_device *udev_device, const char * subsystem);
int udev_device_set_syspath(struct udev_device *udev_device, const char *sy spath); int udev_device_set_syspath(struct udev_device *udev_device, const char *sy spath);
int udev_device_set_devnum(struct udev_device *udev_device, dev_t devnum);
int udev_device_add_devlink(struct udev_device *udev_device, const char *de vlink); int udev_device_add_devlink(struct udev_device *udev_device, const char *de vlink);
void udev_device_cleanup_devlinks_list(struct udev_device *udev_device); void udev_device_cleanup_devlinks_list(struct udev_device *udev_device);
struct udev_list_entry *udev_device_add_property(struct udev_device *udev_d evice, const char *key, const char *value); struct udev_list_entry *udev_device_add_property(struct udev_device *udev_d evice, const char *key, const char *value);
void udev_device_add_property_from_string_parse(struct udev_device *udev_de vice, const char *property); void udev_device_add_property_from_string_parse(struct udev_device *udev_de vice, const char *property);
int udev_device_add_property_from_string_parse_finish(struct udev_device *u dev_device); int udev_device_add_property_from_string_parse_finish(struct udev_device *u dev_device);
char **udev_device_get_properties_envp(struct udev_device *udev_device); char **udev_device_get_properties_envp(struct udev_device *udev_device);
ssize_t udev_device_get_properties_monitor_buf(struct udev_device *udev_dev ice, const char **buf); ssize_t udev_device_get_properties_monitor_buf(struct udev_device *udev_dev ice, const char **buf);
int udev_device_read_db(struct udev_device *udev_device, const char *dbfile ); int udev_device_read_db(struct udev_device *udev_device, const char *dbfile );
int udev_device_read_uevent_file(struct udev_device *udev_device); int udev_device_read_uevent_file(struct udev_device *udev_device);
int udev_device_set_action(struct udev_device *udev_device, const char *act ion); int udev_device_set_action(struct udev_device *udev_device, const char *act ion);
const char *udev_device_get_devpath_old(struct udev_device *udev_device); const char *udev_device_get_devpath_old(struct udev_device *udev_device);
const char *udev_device_get_id_filename(struct udev_device *udev_device); const char *udev_device_get_id_filename(struct udev_device *udev_device);
void udev_device_set_is_initialized(struct udev_device *udev_device); void udev_device_set_is_initialized(struct udev_device *udev_device);
int udev_device_add_tag(struct udev_device *udev_device, const char *tag); int udev_device_add_tag(struct udev_device *udev_device, const char *tag);
void udev_device_remove_tag(struct udev_device *udev_device, const char *ta g);
void udev_device_cleanup_tags_list(struct udev_device *udev_device); void udev_device_cleanup_tags_list(struct udev_device *udev_device);
usec_t udev_device_get_usec_initialized(struct udev_device *udev_device); usec_t udev_device_get_usec_initialized(struct udev_device *udev_device);
void udev_device_set_usec_initialized(struct udev_device *udev_device, usec _t usec_initialized); void udev_device_set_usec_initialized(struct udev_device *udev_device, usec _t usec_initialized);
int udev_device_get_devlink_priority(struct udev_device *udev_device); int udev_device_get_devlink_priority(struct udev_device *udev_device);
int udev_device_set_devlink_priority(struct udev_device *udev_device, int p rio); int udev_device_set_devlink_priority(struct udev_device *udev_device, int p rio);
int udev_device_get_watch_handle(struct udev_device *udev_device); int udev_device_get_watch_handle(struct udev_device *udev_device);
int udev_device_set_watch_handle(struct udev_device *udev_device, int handl e); int udev_device_set_watch_handle(struct udev_device *udev_device, int handl e);
int udev_device_get_ifindex(struct udev_device *udev_device); int udev_device_get_ifindex(struct udev_device *udev_device);
void udev_device_set_info_loaded(struct udev_device *device); void udev_device_set_info_loaded(struct udev_device *device);
bool udev_device_get_db_persist(struct udev_device *udev_device); bool udev_device_get_db_persist(struct udev_device *udev_device);
skipping to change at line 169 skipping to change at line 171
int util_resolve_sys_link(struct udev *udev, char *syspath, size_t size); int util_resolve_sys_link(struct udev *udev, char *syspath, size_t size);
int util_log_priority(const char *priority); int util_log_priority(const char *priority);
size_t util_path_encode(const char *src, char *dest, size_t size); size_t util_path_encode(const char *src, char *dest, size_t size);
void util_remove_trailing_chars(char *path, char c); void util_remove_trailing_chars(char *path, char c);
int util_replace_whitespace(const char *str, char *to, size_t len); int util_replace_whitespace(const char *str, char *to, size_t len);
int util_replace_chars(char *str, const char *white); int util_replace_chars(char *str, const char *white);
unsigned int util_string_hash32(const char *key); unsigned int util_string_hash32(const char *key);
uint64_t util_string_bloom64(const char *str); uint64_t util_string_bloom64(const char *str);
/* libudev-util-private.c */ /* libudev-util-private.c */
int util_delete_path(struct udev *udev, const char *path);
uid_t util_lookup_user(struct udev *udev, const char *user);
gid_t util_lookup_group(struct udev *udev, const char *group);
int util_resolve_subsys_kernel(struct udev *udev, const char *string, char *result, size_t maxsize, int read_value); int util_resolve_subsys_kernel(struct udev *udev, const char *string, char *result, size_t maxsize, int read_value);
ssize_t print_kmsg(const char *fmt, ...) _printf_(1, 2);
#endif #endif
 End of changes. 4 change blocks. 
4 lines changed or deleted 2 lines changed or added


 load-fragment.h   load-fragment.h 
skipping to change at line 70 skipping to change at line 70
int config_parse_kill_signal(const char *unit, const char *filename, unsign ed line, const char *section, unsigned section_line, const char *lvalue, in t ltype, const char *rvalue, void *data, void *userdata); int config_parse_kill_signal(const char *unit, const char *filename, unsign ed line, const char *section, unsigned section_line, const char *lvalue, in t ltype, const char *rvalue, void *data, void *userdata);
int config_parse_exec_mount_flags(const char *unit, const char *filename, u nsigned line, const char *section, unsigned section_line, const char *lvalu e, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_exec_mount_flags(const char *unit, const char *filename, u nsigned line, const char *section, unsigned section_line, const char *lvalu e, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_timer(const char *unit, const char *filename, unsigned lin e, const char *section, unsigned section_line, const char *lvalue, int ltyp e, const char *rvalue, void *data, void *userdata); int config_parse_timer(const char *unit, const char *filename, unsigned lin e, const char *section, unsigned section_line, const char *lvalue, int ltyp e, const char *rvalue, void *data, void *userdata);
int config_parse_trigger_unit(const char *unit, const char *filename, unsig ned line, const char *section, unsigned section_line, const char *lvalue, i nt ltype, const char *rvalue, void *data, void *userdata); int config_parse_trigger_unit(const char *unit, const char *filename, unsig ned line, const char *section, unsigned section_line, const char *lvalue, i nt ltype, const char *rvalue, void *data, void *userdata);
int config_parse_path_spec(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_path_spec(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_socket_service(const char *unit, const char *filename, uns igned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_socket_service(const char *unit, const char *filename, uns igned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_service_sockets(const char *unit, const char *filename, un signed line, const char *section, unsigned section_line, const char *lvalue , int ltype, const char *rvalue, void *data, void *userdata); int config_parse_service_sockets(const char *unit, const char *filename, un signed line, const char *section, unsigned section_line, const char *lvalue , int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_busname_service(const char *unit, const char *filename, un signed line, const char *section, unsigned section_line, const char *lvalue , int ltype, const char *rvalue, void *data, void *userdata); int config_parse_busname_service(const char *unit, const char *filename, un signed line, const char *section, unsigned section_line, const char *lvalue , int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_bus_policy(const char *unit, const char *filename, unsigne d line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_bus_policy(const char *unit, const char *filename, unsigne d line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_bus_policy_world(const char *unit, const char *filename, u nsigned line, const char *section, unsigned section_line, const char *lvalu e, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_bus_policy_world(const char *unit, const char *filename, u nsigned line, const char *section, unsigned section_line, const char *lvalu e, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_bus_endpoint_policy(const char *unit, const char *filename , unsigned line, const char *section, unsigned section_line, const char *lv alue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_unit_env_file(const char *unit, const char *filename, unsi gned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_unit_env_file(const char *unit, const char *filename, unsi gned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_ip_tos(const char *unit, const char *filename, unsigned li ne, const char *section, unsigned section_line, const char *lvalue, int lty pe, const char *rvalue, void *data, void *userdata); int config_parse_ip_tos(const char *unit, const char *filename, unsigned li ne, const char *section, unsigned section_line, const char *lvalue, int lty pe, const char *rvalue, void *data, void *userdata);
int config_parse_unit_condition_path(const char *unit, const char *filename , unsigned line, const char *section, unsigned section_line, const char *lv alue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_unit_condition_path(const char *unit, const char *filename , unsigned line, const char *section, unsigned section_line, const char *lv alue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_unit_condition_string(const char *unit, const char *filena me, unsigned line, const char *section, unsigned section_line, const char * lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_unit_condition_string(const char *unit, const char *filena me, unsigned line, const char *section, unsigned section_line, const char * lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_unit_condition_null(const char *unit, const char *filename , unsigned line, const char *section, unsigned section_line, const char *lv alue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_unit_condition_null(const char *unit, const char *filename , unsigned line, const char *section, unsigned section_line, const char *lv alue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_kill_mode(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_kill_mode(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_notify_access(const char *unit, const char *filename, unsi gned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_notify_access(const char *unit, const char *filename, unsi gned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_failure_action(const char *unit, const char *filename, uns igned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_failure_action(const char *unit, const char *filename, uns igned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_unit_requires_mounts_for(const char *unit, const char *fil ename, unsigned line, const char *section, unsigned section_line, const cha r *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_unit_requires_mounts_for(const char *unit, const char *fil ename, unsigned line, const char *section, unsigned section_line, const cha r *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_syscall_filter(const char *unit, const char *filename, uns igned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_syscall_filter(const char *unit, const char *filename, uns igned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 locale-util.h   locale-util.h 
skipping to change at line 24 skipping to change at line 24
systemd is distributed in the hope that it will be useful, but systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
typedef enum LocaleVariable {
/* We don't list LC_ALL here on purpose. People should be
* using LANG instead. */
VARIABLE_LANG,
VARIABLE_LANGUAGE,
VARIABLE_LC_CTYPE,
VARIABLE_LC_NUMERIC,
VARIABLE_LC_TIME,
VARIABLE_LC_COLLATE,
VARIABLE_LC_MONETARY,
VARIABLE_LC_MESSAGES,
VARIABLE_LC_PAPER,
VARIABLE_LC_NAME,
VARIABLE_LC_ADDRESS,
VARIABLE_LC_TELEPHONE,
VARIABLE_LC_MEASUREMENT,
VARIABLE_LC_IDENTIFICATION,
_VARIABLE_LC_MAX,
_VARIABLE_LC_INVALID = -1
} LocaleVariable;
int get_locales(char ***l); int get_locales(char ***l);
bool locale_is_valid(const char *name); bool locale_is_valid(const char *name);
const char* locale_variable_to_string(LocaleVariable i) _const_;
LocaleVariable locale_variable_from_string(const char *s) _pure_;
 End of changes. 2 change blocks. 
0 lines changed or deleted 22 lines changed or added


 log.h   log.h 
skipping to change at line 160 skipping to change at line 160
if (log_get_max_level() >= (level)) \ if (log_get_max_level() >= (level)) \
log_meta((level), __FILE__, __LINE__, __func__, __VA_ARGS__ ); \ log_meta((level), __FILE__, __LINE__, __func__, __VA_ARGS__ ); \
} while (0) } while (0)
#define log_debug(...) log_full(LOG_DEBUG, __VA_ARGS__) #define log_debug(...) log_full(LOG_DEBUG, __VA_ARGS__)
#define log_info(...) log_full(LOG_INFO, __VA_ARGS__) #define log_info(...) log_full(LOG_INFO, __VA_ARGS__)
#define log_notice(...) log_full(LOG_NOTICE, __VA_ARGS__) #define log_notice(...) log_full(LOG_NOTICE, __VA_ARGS__)
#define log_warning(...) log_full(LOG_WARNING, __VA_ARGS__) #define log_warning(...) log_full(LOG_WARNING, __VA_ARGS__)
#define log_error(...) log_full(LOG_ERR, __VA_ARGS__) #define log_error(...) log_full(LOG_ERR, __VA_ARGS__)
#ifdef LOG_TRACE
# define log_trace(...) log_debug(__VA_ARGS__)
#else
# define log_trace(...) do {} while(0)
#endif
#define log_struct(level, ...) log_struct_internal(level, __FILE__, __LINE_ _, __func__, __VA_ARGS__) #define log_struct(level, ...) log_struct_internal(level, __FILE__, __LINE_ _, __func__, __VA_ARGS__)
#define log_oom() log_oom_internal(__FILE__, __LINE__, __func__) #define log_oom() log_oom_internal(__FILE__, __LINE__, __func__)
/* This modifies the buffer passed! */ /* This modifies the buffer passed! */
#define log_dump(level, buffer) log_dump_internal(level, __FILE__, __LINE__ , __func__, buffer) #define log_dump(level, buffer) log_dump_internal(level, __FILE__, __LINE__ , __func__, buffer)
bool log_on_console(void) _pure_; bool log_on_console(void) _pure_;
const char *log_target_to_string(LogTarget target) _const_; const char *log_target_to_string(LogTarget target) _const_;
 End of changes. 1 change blocks. 
0 lines changed or deleted 6 lines changed or added


 logind-session.h   logind-session.h 
skipping to change at line 177 skipping to change at line 177
SessionType session_type_from_string(const char *s) _pure_; SessionType session_type_from_string(const char *s) _pure_;
const char* session_class_to_string(SessionClass t) _const_; const char* session_class_to_string(SessionClass t) _const_;
SessionClass session_class_from_string(const char *s) _pure_; SessionClass session_class_from_string(const char *s) _pure_;
const char *kill_who_to_string(KillWho k) _const_; const char *kill_who_to_string(KillWho k) _const_;
KillWho kill_who_from_string(const char *s) _pure_; KillWho kill_who_from_string(const char *s) _pure_;
int session_prepare_vt(Session *s); int session_prepare_vt(Session *s);
void session_restore_vt(Session *s); void session_restore_vt(Session *s);
void session_leave_vt(Session *s);
bool session_is_controller(Session *s, const char *sender); bool session_is_controller(Session *s, const char *sender);
int session_set_controller(Session *s, const char *sender, bool force); int session_set_controller(Session *s, const char *sender, bool force);
void session_drop_controller(Session *s); void session_drop_controller(Session *s);
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 logind.h   logind.h 
skipping to change at line 117 skipping to change at line 117
sd_event_source *idle_action_event_source; sd_event_source *idle_action_event_source;
usec_t idle_action_usec; usec_t idle_action_usec;
usec_t idle_action_not_before_usec; usec_t idle_action_not_before_usec;
HandleAction idle_action; HandleAction idle_action;
HandleAction handle_power_key; HandleAction handle_power_key;
HandleAction handle_suspend_key; HandleAction handle_suspend_key;
HandleAction handle_hibernate_key; HandleAction handle_hibernate_key;
HandleAction handle_lid_switch; HandleAction handle_lid_switch;
HandleAction handle_lid_switch_docked;
bool power_key_ignore_inhibited; bool power_key_ignore_inhibited;
bool suspend_key_ignore_inhibited; bool suspend_key_ignore_inhibited;
bool hibernate_key_ignore_inhibited; bool hibernate_key_ignore_inhibited;
bool lid_switch_ignore_inhibited; bool lid_switch_ignore_inhibited;
bool remove_ipc; bool remove_ipc;
Hashmap *polkit_registry; Hashmap *polkit_registry;
skipping to change at line 162 skipping to change at line 163
bool manager_shall_kill(Manager *m, const char *user); bool manager_shall_kill(Manager *m, const char *user);
int manager_get_idle_hint(Manager *m, dual_timestamp *t); int manager_get_idle_hint(Manager *m, dual_timestamp *t);
int manager_get_user_by_pid(Manager *m, pid_t pid, User **user); int manager_get_user_by_pid(Manager *m, pid_t pid, User **user);
int manager_get_session_by_pid(Manager *m, pid_t pid, Session **session); int manager_get_session_by_pid(Manager *m, pid_t pid, Session **session);
bool manager_is_docked(Manager *m); bool manager_is_docked(Manager *m);
int manager_count_displays(Manager *m); int manager_count_displays(Manager *m);
bool manager_is_docked_or_multiple_displays(Manager *m);
extern const sd_bus_vtable manager_vtable[]; extern const sd_bus_vtable manager_vtable[];
int match_job_removed(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error); int match_job_removed(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error);
int match_unit_removed(sd_bus *bus, sd_bus_message *message, void *userdata , sd_bus_error *error); int match_unit_removed(sd_bus *bus, sd_bus_message *message, void *userdata , sd_bus_error *error);
int match_properties_changed(sd_bus *bus, sd_bus_message *message, void *us erdata, sd_bus_error *error); int match_properties_changed(sd_bus *bus, sd_bus_message *message, void *us erdata, sd_bus_error *error);
int match_reloading(sd_bus *bus, sd_bus_message *message, void *userdata, s d_bus_error *error); int match_reloading(sd_bus *bus, sd_bus_message *message, void *userdata, s d_bus_error *error);
int match_name_owner_changed(sd_bus *bus, sd_bus_message *message, void *us erdata, sd_bus_error *error); int match_name_owner_changed(sd_bus *bus, sd_bus_message *message, void *us erdata, sd_bus_error *error);
int bus_manager_shutdown_or_sleep_now_or_later(Manager *m, const char *unit _name, InhibitWhat w, sd_bus_error *error); int bus_manager_shutdown_or_sleep_now_or_later(Manager *m, const char *unit _name, InhibitWhat w, sd_bus_error *error);
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added


 macro.h   macro.h 
skipping to change at line 82 skipping to change at line 82
/* automake test harness */ /* automake test harness */
#define EXIT_TEST_SKIP 77 #define EXIT_TEST_SKIP 77
#define XSTRINGIFY(x) #x #define XSTRINGIFY(x) #x
#define STRINGIFY(x) XSTRINGIFY(x) #define STRINGIFY(x) XSTRINGIFY(x)
#define XCONCATENATE(x, y) x ## y #define XCONCATENATE(x, y) x ## y
#define CONCATENATE(x, y) XCONCATENATE(x, y) #define CONCATENATE(x, y) XCONCATENATE(x, y)
#define UNIQUE(prefix) CONCATENATE(prefix, __LINE__) #define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
#define UNIQ __COUNTER__
/* Rounds up */ /* Rounds up */
#define ALIGN4(l) (((l) + 3) & ~3) #define ALIGN4(l) (((l) + 3) & ~3)
#define ALIGN8(l) (((l) + 7) & ~7) #define ALIGN8(l) (((l) + 7) & ~7)
#if __SIZEOF_POINTER__ == 8 #if __SIZEOF_POINTER__ == 8
#define ALIGN(l) ALIGN8(l) #define ALIGN(l) ALIGN8(l)
#elif __SIZEOF_POINTER__ == 4 #elif __SIZEOF_POINTER__ == 4
#define ALIGN(l) ALIGN4(l) #define ALIGN(l) ALIGN4(l)
skipping to change at line 127 skipping to change at line 128
return 1UL << (sizeof(u) * 8 - __builtin_clzl(u - 1UL)); return 1UL << (sizeof(u) * 8 - __builtin_clzl(u - 1UL));
} }
#define ELEMENTSOF(x) (sizeof(x)/sizeof((x)[0])) #define ELEMENTSOF(x) (sizeof(x)/sizeof((x)[0]))
/* /*
* container_of - cast a member of a structure out to the containing struct ure * container_of - cast a member of a structure out to the containing struct ure
* @ptr: the pointer to the member. * @ptr: the pointer to the member.
* @type: the type of the container struct this is embedded in. * @type: the type of the container struct this is embedded in.
* @member: the name of the member within the struct. * @member: the name of the member within the struct.
*
*/ */
#define container_of(ptr, type, member) \ #define container_of(ptr, type, member) __container_of(UNIQ, (ptr), type, m
ember)
#define __container_of(uniq, ptr, type, member) \
__extension__ ({ \ __extension__ ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr) const typeof( ((type*)0)->member ) *UNIQ_T(A, uniq) = (ptr)
; \ ; \
(type *)( (char *)__mptr - offsetof(type,member) ); (type*)( (char *)UNIQ_T(A, uniq) - offsetof(type,member) );
\ \
}) })
#undef MAX #undef MAX
#define MAX(a,b) \ #define MAX(a, b) __MAX(UNIQ, (a), UNIQ, (b))
#define __MAX(aq, a, bq, b) \
__extension__ ({ \ __extension__ ({ \
const typeof(a) _a = (a); \ const typeof(a) UNIQ_T(A, aq) = (a); \
const typeof(b) _b = (b); \ const typeof(b) UNIQ_T(B, bq) = (b); \
_a > _b ? _a : _b; \ UNIQ_T(A,aq) > UNIQ_T(B,bq) ? UNIQ_T(A,aq) : UNIQ_T(B,bq);
}) \
})
/* evaluates to (void) if _A or _B are not constant or of different types * / /* evaluates to (void) if _A or _B are not constant or of different types * /
#define CONST_MAX(_A, _B) \ #define CONST_MAX(_A, _B) \
__extension__ (__builtin_choose_expr( \ __extension__ (__builtin_choose_expr( \
__builtin_constant_p(_A) && \ __builtin_constant_p(_A) && \
__builtin_constant_p(_B) && \ __builtin_constant_p(_B) && \
__builtin_types_compatible_p(typeof(_A), typeof(_B)), \ __builtin_types_compatible_p(typeof(_A), typeof(_B)), \
((_A) > (_B)) ? (_A) : (_B), \ ((_A) > (_B)) ? (_A) : (_B), \
(void)0)) (void)0))
/* takes two types and returns the size of the larger one */
#define MAXSIZE(A, B) (sizeof(union _packed_ { typeof(A) a; typeof(B) b; })
)
#define MAX3(x,y,z) \ #define MAX3(x,y,z) \
__extension__ ({ \ __extension__ ({ \
const typeof(x) _c = MAX(x,y); \ const typeof(x) _c = MAX(x,y); \
MAX(_c, z); \ MAX(_c, z); \
}) })
#undef MIN #undef MIN
#define MIN(a,b) \ #define MIN(a, b) __MIN(UNIQ, (a), UNIQ, (b))
#define __MIN(aq, a, bq, b) \
__extension__ ({ \ __extension__ ({ \
const typeof(a) _a = (a); \ const typeof(a) UNIQ_T(A, aq) = (a); \
const typeof(b) _b = (b); \ const typeof(b) UNIQ_T(B, bq) = (b); \
_a < _b ? _a : _b; \ UNIQ_T(A,aq) < UNIQ_T(B,bq) ? UNIQ_T(A,aq) : UNIQ_T(B,bq);
}) \
})
#define MIN3(x,y,z) \ #define MIN3(x,y,z) \
__extension__ ({ \ __extension__ ({ \
const typeof(x) _c = MIN(x,y); \ const typeof(x) _c = MIN(x,y); \
MIN(_c, z); \ MIN(_c, z); \
}) })
#define LESS_BY(A,B) \ #define LESS_BY(a, b) __LESS_BY(UNIQ, (a), UNIQ, (b))
#define __LESS_BY(aq, a, bq, b) \
__extension__ ({ \ __extension__ ({ \
const typeof(A) _A = (A); \ const typeof(a) UNIQ_T(A, aq) = (a); \
const typeof(B) _B = (B); \ const typeof(b) UNIQ_T(B, bq) = (b); \
_A > _B ? _A - _B : 0; \ UNIQ_T(A,aq) > UNIQ_T(B,bq) ? UNIQ_T(A,aq) - UNIQ_T(B,bq) :
}) 0; \
})
#ifndef CLAMP
#define CLAMP(x, low, high) \ #undef CLAMP
#define CLAMP(x, low, high) __CLAMP(UNIQ, (x), UNIQ, (low), UNIQ, (high))
#define __CLAMP(xq, x, lowq, low, highq, high) \
__extension__ ({ \ __extension__ ({ \
const typeof(x) _x = (x); \ const typeof(x) UNIQ_T(X,xq) = (x); \
const typeof(low) _low = (low); \ const typeof(low) UNIQ_T(LOW,lowq) = (low); \
const typeof(high) _high = (high); \ const typeof(high) UNIQ_T(HIGH,highq) = (high); \
((_x > _high) ? _high : ((_x < _low) ? _low : _x)); UNIQ_T(X,xq) > UNIQ_T(HIGH,highq) ? \
\ UNIQ_T(HIGH,highq) : \
}) UNIQ_T(X,xq) < UNIQ_T(LOW,lowq) ? \
#endif UNIQ_T(LOW,lowq) : \
UNIQ_T(X,xq); \
})
#define assert_se(expr) \ #define assert_se(expr) \
do { \ do { \
if (_unlikely_(!(expr))) \ if (_unlikely_(!(expr))) \
log_assert_failed(#expr, __FILE__, __LINE__, __PRET TY_FUNCTION__); \ log_assert_failed(#expr, __FILE__, __LINE__, __PRET TY_FUNCTION__); \
} while (false) \ } while (false) \
/* We override the glibc assert() here. */ /* We override the glibc assert() here. */
#undef assert #undef assert
#ifdef NDEBUG #ifdef NDEBUG
skipping to change at line 219 skipping to change at line 230
/* static_assert() is sometimes defined in a way that trips up /* static_assert() is sometimes defined in a way that trips up
* -Wdeclaration-after-statement, hence let's temporarily turn off * -Wdeclaration-after-statement, hence let's temporarily turn off
* this warning around it. */ * this warning around it. */
#define assert_cc(expr) \ #define assert_cc(expr) \
DISABLE_WARNING_DECLARATION_AFTER_STATEMENT; \ DISABLE_WARNING_DECLARATION_AFTER_STATEMENT; \
static_assert(expr, #expr); \ static_assert(expr, #expr); \
REENABLE_WARNING REENABLE_WARNING
#else #else
#define assert_cc(expr) \ #define assert_cc(expr) \
DISABLE_WARNING_DECLARATION_AFTER_STATEMENT; \ DISABLE_WARNING_DECLARATION_AFTER_STATEMENT; \
struct UNIQUE(_assert_struct_) { \ struct CONCATENATE(_assert_struct_, __LINE__) { \
char x[(expr) ? 0 : -1]; \ char x[(expr) ? 0 : -1]; \
}; \ }; \
REENABLE_WARNING REENABLE_WARNING
#endif #endif
#define assert_return(expr, r) \ #define assert_return(expr, r) \
do { \ do { \
if (_unlikely_(!(expr))) { \ if (_unlikely_(!(expr))) { \
log_assert_failed_return(#expr, __FILE__, __LINE__, __PRETTY_FUNCTION__); \ log_assert_failed_return(#expr, __FILE__, __LINE__, __PRETTY_FUNCTION__); \
return (r); \ return (r); \
 End of changes. 13 change blocks. 
34 lines changed or deleted 49 lines changed or added


 manager.h   manager.h 
skipping to change at line 39 skipping to change at line 39
#include "sd-event.h" #include "sd-event.h"
#include "fdset.h" #include "fdset.h"
#include "cgroup-util.h" #include "cgroup-util.h"
/* Enforce upper limit how many names we allow */ /* Enforce upper limit how many names we allow */
#define MANAGER_MAX_NAMES 131072 /* 128K */ #define MANAGER_MAX_NAMES 131072 /* 128K */
typedef struct Manager Manager; typedef struct Manager Manager;
typedef enum ManagerState { typedef enum ManagerState {
MANAGER_INITIALIZING,
MANAGER_STARTING, MANAGER_STARTING,
MANAGER_RUNNING, MANAGER_RUNNING,
MANAGER_DEGRADED, MANAGER_DEGRADED,
MANAGER_MAINTENANCE, MANAGER_MAINTENANCE,
MANAGER_STOPPING, MANAGER_STOPPING,
_MANAGER_STATE_MAX, _MANAGER_STATE_MAX,
_MANAGER_STATE_INVALID = -1 _MANAGER_STATE_INVALID = -1
} ManagerState; } ManagerState;
typedef enum ManagerExitCode { typedef enum ManagerExitCode {
skipping to change at line 62 skipping to change at line 63
MANAGER_REEXECUTE, MANAGER_REEXECUTE,
MANAGER_REBOOT, MANAGER_REBOOT,
MANAGER_POWEROFF, MANAGER_POWEROFF,
MANAGER_HALT, MANAGER_HALT,
MANAGER_KEXEC, MANAGER_KEXEC,
MANAGER_SWITCH_ROOT, MANAGER_SWITCH_ROOT,
_MANAGER_EXIT_CODE_MAX, _MANAGER_EXIT_CODE_MAX,
_MANAGER_EXIT_CODE_INVALID = -1 _MANAGER_EXIT_CODE_INVALID = -1
} ManagerExitCode; } ManagerExitCode;
typedef enum StatusType {
STATUS_TYPE_EPHEMERAL,
STATUS_TYPE_NORMAL,
STATUS_TYPE_EMERGENCY,
} StatusType;
#include "unit.h" #include "unit.h"
#include "job.h" #include "job.h"
#include "hashmap.h" #include "hashmap.h"
#include "list.h" #include "list.h"
#include "set.h" #include "set.h"
#include "path-lookup.h" #include "path-lookup.h"
#include "execute.h" #include "execute.h"
#include "unit-name.h" #include "unit-name.h"
#include "exit-status.h" #include "exit-status.h"
#include "show-status.h" #include "show-status.h"
#include "failure-action.h"
struct Manager { struct Manager {
/* Note that the set of units we know of is allowed to be /* Note that the set of units we know of is allowed to be
* inconsistent. However the subset of it that is loaded may * inconsistent. However the subset of it that is loaded may
* not, and the list of jobs may neither. */ * not, and the list of jobs may neither. */
/* Active jobs and units */ /* Active jobs and units */
Hashmap *units; /* name string => Unit object n:1 */ Hashmap *units; /* name string => Unit object n:1 */
Hashmap *jobs; /* job id => Job object 1:1 */ Hashmap *jobs; /* job id => Job object 1:1 */
skipping to change at line 155 skipping to change at line 163
usec_t runtime_watchdog; usec_t runtime_watchdog;
usec_t shutdown_watchdog; usec_t shutdown_watchdog;
dual_timestamp firmware_timestamp; dual_timestamp firmware_timestamp;
dual_timestamp loader_timestamp; dual_timestamp loader_timestamp;
dual_timestamp kernel_timestamp; dual_timestamp kernel_timestamp;
dual_timestamp initrd_timestamp; dual_timestamp initrd_timestamp;
dual_timestamp userspace_timestamp; dual_timestamp userspace_timestamp;
dual_timestamp finish_timestamp; dual_timestamp finish_timestamp;
dual_timestamp security_start_timestamp; dual_timestamp security_start_timestamp;
dual_timestamp security_finish_timestamp; dual_timestamp security_finish_timestamp;
dual_timestamp generators_start_timestamp; dual_timestamp generators_start_timestamp;
dual_timestamp generators_finish_timestamp; dual_timestamp generators_finish_timestamp;
dual_timestamp units_load_start_timestamp; dual_timestamp units_load_start_timestamp;
dual_timestamp units_load_finish_timestamp; dual_timestamp units_load_finish_timestamp;
char *generator_unit_path; char *generator_unit_path;
char *generator_unit_path_early; char *generator_unit_path_early;
char *generator_unit_path_late; char *generator_unit_path_late;
skipping to change at line 265 skipping to change at line 274
int n_reloading; int n_reloading;
unsigned n_installed_jobs; unsigned n_installed_jobs;
unsigned n_failed_jobs; unsigned n_failed_jobs;
/* Jobs in progress watching */ /* Jobs in progress watching */
unsigned n_running_jobs; unsigned n_running_jobs;
unsigned n_on_console; unsigned n_on_console;
unsigned jobs_in_progress_iteration; unsigned jobs_in_progress_iteration;
/* Do we have any outstanding password prompts? */
int have_ask_password;
int ask_password_inotify_fd;
sd_event_source *ask_password_event_source;
/* Type=idle pipes */ /* Type=idle pipes */
int idle_pipe[4]; int idle_pipe[4];
sd_event_source *idle_pipe_event_source; sd_event_source *idle_pipe_event_source;
char *switch_root; char *switch_root;
char *switch_root_init; char *switch_root_init;
/* This maps all possible path prefixes to the units needing /* This maps all possible path prefixes to the units needing
* them. It's a hashmap with a path string as key and a Set as * them. It's a hashmap with a path string as key and a Set as
* value where Unit objects are contained. */ * value where Unit objects are contained. */
skipping to change at line 344 skipping to change at line 358
void manager_check_finished(Manager *m); void manager_check_finished(Manager *m);
void manager_run_generators(Manager *m); void manager_run_generators(Manager *m);
void manager_undo_generators(Manager *m); void manager_undo_generators(Manager *m);
void manager_recheck_journal(Manager *m); void manager_recheck_journal(Manager *m);
void manager_set_show_status(Manager *m, ShowStatus mode); void manager_set_show_status(Manager *m, ShowStatus mode);
void manager_set_first_boot(Manager *m, bool b); void manager_set_first_boot(Manager *m, bool b);
void manager_status_printf(Manager *m, bool ephemeral, const char *status, const char *format, ...) _printf_(4,5); void manager_status_printf(Manager *m, StatusType type, const char *status, const char *format, ...) _printf_(4,5);
void manager_flip_auto_status(Manager *m, bool enable); void manager_flip_auto_status(Manager *m, bool enable);
Set *manager_get_units_requiring_mounts_for(Manager *m, const char *path); Set *manager_get_units_requiring_mounts_for(Manager *m, const char *path);
const char *manager_get_runtime_prefix(Manager *m); const char *manager_get_runtime_prefix(Manager *m);
ManagerState manager_state(Manager *m); ManagerState manager_state(Manager *m);
const char *manager_state_to_string(ManagerState m) _const_; const char *manager_state_to_string(ManagerState m) _const_;
ManagerState manager_state_from_string(const char *s) _pure_; ManagerState manager_state_from_string(const char *s) _pure_;
 End of changes. 6 change blocks. 
1 lines changed or deleted 15 lines changed or added


 missing.h   missing.h 
skipping to change at line 36 skipping to change at line 36
#include <sys/resource.h> #include <sys/resource.h>
#include <sys/syscall.h> #include <sys/syscall.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include <linux/oom.h> #include <linux/oom.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/if_link.h> #include <linux/if_link.h>
#include <linux/loop.h> #include <linux/loop.h>
#include <linux/if_link.h>
#ifdef HAVE_AUDIT #ifdef HAVE_AUDIT
#include <libaudit.h> #include <libaudit.h>
#endif #endif
#include "macro.h" #include "macro.h"
#ifdef ARCH_MIPS #ifdef ARCH_MIPS
#include <asm/sgidefs.h> #include <asm/sgidefs.h>
#endif #endif
skipping to change at line 69 skipping to change at line 68
#ifndef F_SETPIPE_SZ #ifndef F_SETPIPE_SZ
#define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7) #define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7)
#endif #endif
#ifndef F_GETPIPE_SZ #ifndef F_GETPIPE_SZ
#define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8) #define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8)
#endif #endif
#ifndef F_ADD_SEALS #ifndef F_ADD_SEALS
#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9) #define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
#endif
#ifndef F_GET_SEALS
#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10) #define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
#endif
#ifndef F_SEAL_SEAL
#define F_SEAL_SEAL 0x0001 /* prevent further seals from being set */ #define F_SEAL_SEAL 0x0001 /* prevent further seals from being set */
#endif
#ifndef F_SEAL_SHRINK
#define F_SEAL_SHRINK 0x0002 /* prevent file from shrinking */ #define F_SEAL_SHRINK 0x0002 /* prevent file from shrinking */
#endif
#ifndef F_SEAL_GROW
#define F_SEAL_GROW 0x0004 /* prevent file from growing */ #define F_SEAL_GROW 0x0004 /* prevent file from growing */
#endif
#ifndef F_SEAL_WRITE
#define F_SEAL_WRITE 0x0008 /* prevent writes */ #define F_SEAL_WRITE 0x0008 /* prevent writes */
#endif #endif
#ifndef MFD_ALLOW_SEALING #ifndef MFD_ALLOW_SEALING
#define MFD_ALLOW_SEALING 0x0002ULL #define MFD_ALLOW_SEALING 0x0002ULL
#endif #endif
#ifndef IP_FREEBIND #ifndef IP_FREEBIND
#define IP_FREEBIND 15 #define IP_FREEBIND 15
#endif #endif
skipping to change at line 134 skipping to change at line 119
#define SOL_NETLINK 270 #define SOL_NETLINK 270
#endif #endif
#if !HAVE_DECL_PIVOT_ROOT #if !HAVE_DECL_PIVOT_ROOT
static inline int pivot_root(const char *new_root, const char *put_old) { static inline int pivot_root(const char *new_root, const char *put_old) {
return syscall(SYS_pivot_root, new_root, put_old); return syscall(SYS_pivot_root, new_root, put_old);
} }
#endif #endif
#ifdef __x86_64__ #ifdef __x86_64__
# ifndef __NR_fanotify_init
# define __NR_fanotify_init 300
# endif
# ifndef __NR_fanotify_mark
# define __NR_fanotify_mark 301
# endif
# ifndef __NR_memfd_create # ifndef __NR_memfd_create
# define __NR_memfd_create 319 # define __NR_memfd_create 319
# endif # endif
#elif defined __arm__ #elif defined __arm__
# ifndef __NR_memfd_create # ifndef __NR_memfd_create
# define __NR_memfd_create 385 # define __NR_memfd_create 385
# endif # endif
#elif defined _MIPS_SIM #elif defined _MIPS_SIM
# if _MIPS_SIM == _MIPS_SIM_ABI32 # ifndef __NR_memfd_create
# ifndef __NR_fanotify_init # warning "__NR_memfd_create not yet defined for MIPS"
# define __NR_fanotify_init 4336 # define __NR_memfd_create 0xffffffff
# endif
# ifndef __NR_fanotify_mark
# define __NR_fanotify_mark 4337
# endif
# elif _MIPS_SIM == _MIPS_SIM_NABI32
# ifndef __NR_fanotify_init
# define __NR_fanotify_init 6300
# endif
# ifndef __NR_fanotify_mark
# define __NR_fanotify_mark 6301
# endif
# elif _MIPS_SIM == _MIPS_SIM_ABI64
# ifndef __NR_fanotify_init
# define __NR_fanotify_init 5295
# endif
# ifndef __NR_fanotify_mark
# define __NR_fanotify_mark 5296
# endif
# endif # endif
#else #else
# ifndef __NR_fanotify_init
# define __NR_fanotify_init 338
# endif
# ifndef __NR_fanotify_mark
# define __NR_fanotify_mark 339
# endif
# ifndef __NR_memfd_create # ifndef __NR_memfd_create
# define __NR_memfd_create 356 # define __NR_memfd_create 356
# endif # endif
#endif #endif
#ifndef HAVE_FANOTIFY_INIT
static inline int fanotify_init(unsigned int flags, unsigned int event_f_fl
ags) {
return syscall(__NR_fanotify_init, flags, event_f_flags);
}
#endif
#ifndef HAVE_FANOTIFY_MARK
static inline int fanotify_mark(int fanotify_fd, unsigned int flags, uint64
_t mask,
int dfd, const char *pathname) {
#if defined _MIPS_SIM && _MIPS_SIM == _MIPS_SIM_ABI32 || defined __powerpc_
_ && !defined __powerpc64__ \
|| defined __arm__ && !defined __aarch64__
union {
uint64_t _64;
uint32_t _32[2];
} _mask;
_mask._64 = mask;
return syscall(__NR_fanotify_mark, fanotify_fd, flags,
_mask._32[0], _mask._32[1], dfd, pathname);
#else
return syscall(__NR_fanotify_mark, fanotify_fd, flags, mask, dfd, p
athname);
#endif
}
#endif
#ifndef HAVE_MEMFD_CREATE #ifndef HAVE_MEMFD_CREATE
static inline int memfd_create(const char *name, uint64_t flags) { static inline int memfd_create(const char *name, unsigned int flags) {
return syscall(__NR_memfd_create, name, flags); return syscall(__NR_memfd_create, name, flags);
} }
#endif #endif
#ifndef BTRFS_IOCTL_MAGIC #ifndef BTRFS_IOCTL_MAGIC
#define BTRFS_IOCTL_MAGIC 0x94 #define BTRFS_IOCTL_MAGIC 0x94
#endif #endif
#ifndef BTRFS_PATH_NAME_MAX #ifndef BTRFS_PATH_NAME_MAX
#define BTRFS_PATH_NAME_MAX 4087 #define BTRFS_PATH_NAME_MAX 4087
skipping to change at line 557 skipping to change at line 487
#define IFLA_BRIDGE_VLAN_INFO 2 #define IFLA_BRIDGE_VLAN_INFO 2
#define __IFLA_BRIDGE_MAX 3 #define __IFLA_BRIDGE_MAX 3
#define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1) #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
#endif #endif
#ifndef IPV6_UNICAST_IF #ifndef IPV6_UNICAST_IF
#define IPV6_UNICAST_IF 76 #define IPV6_UNICAST_IF 76
#endif #endif
#ifndef IFF_MULTI_QUEUE
#define IFF_MULTI_QUEUE 0x100
#endif
#ifndef IFF_LOWER_UP #ifndef IFF_LOWER_UP
#define IFF_LOWER_UP 0x10000 #define IFF_LOWER_UP 0x10000
#endif #endif
#ifndef IFF_DORMANT #ifndef IFF_DORMANT
#define IFF_DORMANT 0x20000 #define IFF_DORMANT 0x20000
#endif #endif
#ifndef BOND_XMIT_POLICY_ENCAP23 #ifndef BOND_XMIT_POLICY_ENCAP23
#define BOND_XMIT_POLICY_ENCAP23 3 #define BOND_XMIT_POLICY_ENCAP23 3
skipping to change at line 592 skipping to change at line 526
# define NET_NAME_PREDICTABLE 2 # define NET_NAME_PREDICTABLE 2
#endif #endif
#ifndef NET_NAME_USER #ifndef NET_NAME_USER
# define NET_NAME_USER 3 # define NET_NAME_USER 3
#endif #endif
#ifndef NET_NAME_RENAMED #ifndef NET_NAME_RENAMED
# define NET_NAME_RENAMED 4 # define NET_NAME_RENAMED 4
#endif #endif
#ifndef BPF_XOR
# define BPF_XOR 0xa0
#endif
/* Note that LOOPBACK_IFINDEX is currently not exported by the
* kernel/glibc, but hardcoded internally by the kernel. However, as
* it is exported to userspace indirectly via rtnetlink and the
* ioctls, and made use of widely we define it here too, in a way that
* is compatible with the kernel's internal definition. */
#ifndef LOOPBACK_IFINDEX
#define LOOPBACK_IFINDEX 1
#endif
 End of changes. 14 change blocks. 
78 lines changed or deleted 8 lines changed or added


 mkdir.h   mkdir.h 
skipping to change at line 31 skipping to change at line 31
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#include <stdbool.h> #include <stdbool.h>
#include <sys/types.h> #include <sys/types.h>
int mkdir_safe(const char *path, mode_t mode, uid_t uid, gid_t gid); int mkdir_safe(const char *path, mode_t mode, uid_t uid, gid_t gid);
int mkdir_parents(const char *path, mode_t mode); int mkdir_parents(const char *path, mode_t mode);
int mkdir_p(const char *path, mode_t mode); int mkdir_p(const char *path, mode_t mode);
int mkdir_p_prefix(const char *prefix, const char *path, mode_t mode);
/* selinux versions */ /* mandatory access control(MAC) versions */
int mkdir_label(const char *path, mode_t mode);
int mkdir_safe_label(const char *path, mode_t mode, uid_t uid, gid_t gid); int mkdir_safe_label(const char *path, mode_t mode, uid_t uid, gid_t gid);
int mkdir_parents_label(const char *path, mode_t mode); int mkdir_parents_label(const char *path, mode_t mode);
int mkdir_p_label(const char *path, mode_t mode); int mkdir_p_label(const char *path, mode_t mode);
int mkdir_parents_prefix_label(const char *prefix, const char *path, mode_t mode);
/* internally used */ /* internally used */
typedef int (*mkdir_func_t)(const char *pathname, mode_t mode); typedef int (*mkdir_func_t)(const char *pathname, mode_t mode);
int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid , mkdir_func_t _mkdir); int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid , mkdir_func_t _mkdir);
int mkdir_parents_internal(const char *prefix, const char *path, mode_t mod e, mkdir_func_t _mkdir); int mkdir_parents_internal(const char *prefix, const char *path, mode_t mod e, mkdir_func_t _mkdir);
int mkdir_p_internal(const char *prefix, const char *path, mode_t mode, mkd ir_func_t _mkdir); int mkdir_p_internal(const char *prefix, const char *path, mode_t mode, mkd ir_func_t _mkdir);
int is_dir(const char *path, bool is_dir);
 End of changes. 4 change blocks. 
4 lines changed or deleted 1 lines changed or added


 mmap-cache.h   mmap-cache.h 
skipping to change at line 43 skipping to change at line 43
int mmap_cache_get( int mmap_cache_get(
MMapCache *m, MMapCache *m,
int fd, int fd,
int prot, int prot,
unsigned context, unsigned context,
bool keep_always, bool keep_always,
uint64_t offset, uint64_t offset,
size_t size, size_t size,
struct stat *st, struct stat *st,
void **ret); void **ret,
void **release_cookie);
int mmap_cache_release( int mmap_cache_release(
MMapCache *m, MMapCache *m,
int fd, int fd,
int prot, void *release_cookie);
unsigned context,
uint64_t offset,
size_t size);
void mmap_cache_close_fd(MMapCache *m, int fd); void mmap_cache_close_fd(MMapCache *m, int fd);
void mmap_cache_close_context(MMapCache *m, unsigned context); void mmap_cache_close_context(MMapCache *m, unsigned context);
unsigned mmap_cache_get_hit(MMapCache *m); unsigned mmap_cache_get_hit(MMapCache *m);
unsigned mmap_cache_get_missed(MMapCache *m); unsigned mmap_cache_get_missed(MMapCache *m);
 End of changes. 2 change blocks. 
5 lines changed or deleted 3 lines changed or added


 namespace.h   namespace.h 
skipping to change at line 47 skipping to change at line 47
PROTECT_SYSTEM_NO, PROTECT_SYSTEM_NO,
PROTECT_SYSTEM_YES, PROTECT_SYSTEM_YES,
PROTECT_SYSTEM_FULL, PROTECT_SYSTEM_FULL,
_PROTECT_SYSTEM_MAX, _PROTECT_SYSTEM_MAX,
_PROTECT_SYSTEM_INVALID = -1 _PROTECT_SYSTEM_INVALID = -1
} ProtectSystem; } ProtectSystem;
int setup_namespace(char **read_write_dirs, int setup_namespace(char **read_write_dirs,
char **read_only_dirs, char **read_only_dirs,
char **inaccessible_dirs, char **inaccessible_dirs,
char *tmp_dir, const char *tmp_dir,
char *var_tmp_dir, const char *var_tmp_dir,
const char *endpoint_path,
bool private_dev, bool private_dev,
ProtectHome protect_home, ProtectHome protect_home,
ProtectSystem protect_system, ProtectSystem protect_system,
unsigned mount_flags); unsigned mount_flags);
int setup_tmp_dirs(const char *id, int setup_tmp_dirs(const char *id,
char **tmp_dir, char **tmp_dir,
char **var_tmp_dir); char **var_tmp_dir);
int setup_netns(int netns_storage_socket[2]); int setup_netns(int netns_storage_socket[2]);
 End of changes. 1 change blocks. 
2 lines changed or deleted 3 lines changed or added


 networkd-link.h   networkd-link.h 
skipping to change at line 116 skipping to change at line 116
void link_enter_failed(Link *link); void link_enter_failed(Link *link);
int link_initialized(Link *link, struct udev_device *device); int link_initialized(Link *link, struct udev_device *device);
void link_client_handler(Link *link); void link_client_handler(Link *link);
int link_update(Link *link, sd_rtnl_message *message); int link_update(Link *link, sd_rtnl_message *message);
int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message, void *userdata); int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message, void *userdata);
int link_save(Link *link); int link_save(Link *link);
bool link_has_carrier(unsigned flags, uint8_t operstate); bool link_has_carrier(Link *link);
int link_set_mtu(Link *link, uint32_t mtu); int link_set_mtu(Link *link, uint32_t mtu);
int link_set_hostname(Link *link, const char *hostname); int link_set_hostname(Link *link, const char *hostname);
int ipv4ll_configure(Link *link); int ipv4ll_configure(Link *link);
int dhcp4_configure(Link *link); int dhcp4_configure(Link *link);
const char* link_state_to_string(LinkState s) _const_; const char* link_state_to_string(LinkState s) _const_;
LinkState link_state_from_string(const char *s) _pure_; LinkState link_state_from_string(const char *s) _pure_;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 networkd.h   networkd.h 
skipping to change at line 103 skipping to change at line 103
DHCPSupport dhcp; DHCPSupport dhcp;
bool dhcp_dns; bool dhcp_dns;
bool dhcp_ntp; bool dhcp_ntp;
bool dhcp_mtu; bool dhcp_mtu;
bool dhcp_hostname; bool dhcp_hostname;
bool dhcp_domains; bool dhcp_domains;
bool dhcp_sendhost; bool dhcp_sendhost;
bool dhcp_broadcast; bool dhcp_broadcast;
bool dhcp_critical; bool dhcp_critical;
bool dhcp_routes; bool dhcp_routes;
unsigned dhcp_route_metric;
bool ipv4ll; bool ipv4ll;
bool ipv4ll_route; bool ipv4ll_route;
bool dhcp_server; bool dhcp_server;
LIST_HEAD(Address, static_addresses); LIST_HEAD(Address, static_addresses);
LIST_HEAD(Route, static_routes); LIST_HEAD(Route, static_routes);
Hashmap *addresses_by_section; Hashmap *addresses_by_section;
Hashmap *routes_by_section; Hashmap *routes_by_section;
skipping to change at line 153 skipping to change at line 154
unsigned section; unsigned section;
int family; int family;
unsigned char dst_prefixlen; unsigned char dst_prefixlen;
unsigned char scope; unsigned char scope;
uint32_t metrics; uint32_t metrics;
unsigned char protocol; /* RTPROT_* */ unsigned char protocol; /* RTPROT_* */
union in_addr_union in_addr; union in_addr_union in_addr;
union in_addr_union dst_addr; union in_addr_union dst_addr;
union in_addr_union prefsrc_addr;
LIST_FIELDS(Route, routes); LIST_FIELDS(Route, routes);
}; };
struct AddressPool { struct AddressPool {
Manager *manager; Manager *manager;
int family; int family;
unsigned prefixlen; unsigned prefixlen;
skipping to change at line 175 skipping to change at line 177
LIST_FIELDS(AddressPool, address_pools); LIST_FIELDS(AddressPool, address_pools);
}; };
struct Manager { struct Manager {
sd_rtnl *rtnl; sd_rtnl *rtnl;
sd_event *event; sd_event *event;
sd_bus *bus; sd_bus *bus;
struct udev *udev; struct udev *udev;
struct udev_monitor *udev_monitor; struct udev_monitor *udev_monitor;
sd_event_source *udev_event_source; sd_event_source *udev_event_source;
sd_event_source *sigterm_event_source;
sd_event_source *sigint_event_source;
char *state_file; char *state_file;
Hashmap *links; Hashmap *links;
Hashmap *netdevs; Hashmap *netdevs;
LIST_HEAD(Network, networks); LIST_HEAD(Network, networks);
LIST_HEAD(AddressPool, address_pools); LIST_HEAD(AddressPool, address_pools);
usec_t network_dirs_ts_usec; usec_t network_dirs_ts_usec;
}; };
 End of changes. 3 change blocks. 
2 lines changed or deleted 2 lines changed or added


 output-mode.h   output-mode.h 
skipping to change at line 47 skipping to change at line 47
} OutputMode; } OutputMode;
typedef enum OutputFlags { typedef enum OutputFlags {
OUTPUT_SHOW_ALL = 1 << 0, OUTPUT_SHOW_ALL = 1 << 0,
OUTPUT_FOLLOW = 1 << 1, OUTPUT_FOLLOW = 1 << 1,
OUTPUT_WARN_CUTOFF = 1 << 2, OUTPUT_WARN_CUTOFF = 1 << 2,
OUTPUT_FULL_WIDTH = 1 << 3, OUTPUT_FULL_WIDTH = 1 << 3,
OUTPUT_COLOR = 1 << 4, OUTPUT_COLOR = 1 << 4,
OUTPUT_CATALOG = 1 << 5, OUTPUT_CATALOG = 1 << 5,
OUTPUT_BEGIN_NEWLINE = 1 << 6, OUTPUT_BEGIN_NEWLINE = 1 << 6,
OUTPUT_UTC = 1 << 7,
} OutputFlags; } OutputFlags;
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 path-lookup.h   path-lookup.h 
skipping to change at line 41 skipping to change at line 41
#endif #endif
} LookupPaths; } LookupPaths;
typedef enum SystemdRunningAs { typedef enum SystemdRunningAs {
SYSTEMD_SYSTEM, SYSTEMD_SYSTEM,
SYSTEMD_USER, SYSTEMD_USER,
_SYSTEMD_RUNNING_AS_MAX, _SYSTEMD_RUNNING_AS_MAX,
_SYSTEMD_RUNNING_AS_INVALID = -1 _SYSTEMD_RUNNING_AS_INVALID = -1
} SystemdRunningAs; } SystemdRunningAs;
#define _cleanup_lookup_paths_free_ _cleanup_(lookup_paths_free)
int user_config_home(char **config_home); int user_config_home(char **config_home);
int user_runtime_dir(char **runtime_dir);
int lookup_paths_init(LookupPaths *p, int lookup_paths_init(LookupPaths *p,
SystemdRunningAs running_as, SystemdRunningAs running_as,
bool personal, bool personal,
const char *root_dir, const char *root_dir,
const char *generator, const char *generator,
const char *generator_early, const char *generator_early,
const char *generator_late); const char *generator_late);
void lookup_paths_free(LookupPaths *p); void lookup_paths_free(LookupPaths *p);
#define _cleanup_lookup_paths_free_ _cleanup_(lookup_paths_free)
 End of changes. 3 change blocks. 
2 lines changed or deleted 1 lines changed or added


 path-util.h   path-util.h 
skipping to change at line 68 skipping to change at line 68
int find_binary(const char *name, char **filename); int find_binary(const char *name, char **filename);
bool paths_check_timestamp(const char* const* paths, usec_t *paths_ts_usec, bool update); bool paths_check_timestamp(const char* const* paths, usec_t *paths_ts_usec, bool update);
int fsck_exists(const char *fstype); int fsck_exists(const char *fstype);
/* Iterates through the path prefixes of the specified path, going up /* Iterates through the path prefixes of the specified path, going up
* the tree, to root. Also returns "" (and not "/"!) for the root * the tree, to root. Also returns "" (and not "/"!) for the root
* directory. Excludes the specified directory itself */ * directory. Excludes the specified directory itself */
#define PATH_FOREACH_PREFIX(prefix, path) \ #define PATH_FOREACH_PREFIX(prefix, path) \
for (char *_slash = ({ path_kill_slashes(strcpy(prefix, path)); str eq(prefix, "/") ? NULL : strrchr(prefix, '/'); }); _slash && !(*_slash = 0) ; _slash = strrchr((prefix), '/')) for (char *_slash = ({ path_kill_slashes(strcpy(prefix, path)); str eq(prefix, "/") ? NULL : strrchr(prefix, '/'); }); _slash && ((*_slash = 0) , true); _slash = strrchr((prefix), '/'))
/* Same as PATH_FOREACH_PREFIX but also includes the specified path itself */ /* Same as PATH_FOREACH_PREFIX but also includes the specified path itself */
#define PATH_FOREACH_PREFIX_MORE(prefix, path) \ #define PATH_FOREACH_PREFIX_MORE(prefix, path) \
for (char *_slash = ({ path_kill_slashes(strcpy(prefix, path)); if (streq(prefix, "/")) prefix[0] = 0; strrchr(prefix, 0); }); _slash && !(*_s lash = 0); _slash = strrchr((prefix), '/')) for (char *_slash = ({ path_kill_slashes(strcpy(prefix, path)); if (streq(prefix, "/")) prefix[0] = 0; strrchr(prefix, 0); }); _slash && ((*_s lash = 0), true); _slash = strrchr((prefix), '/'))
 End of changes. 2 change blocks. 
1 lines changed or deleted 1 lines changed or added


 resolved-dns-domain.h   resolved-dns-domain.h 
skipping to change at line 40 skipping to change at line 40
int dns_label_unescape(const char **name, char *dest, size_t sz); int dns_label_unescape(const char **name, char *dest, size_t sz);
int dns_label_escape(const char *p, size_t l, char **ret); int dns_label_escape(const char *p, size_t l, char **ret);
int dns_label_apply_idna(const char *encoded, size_t encoded_size, char *de coded, size_t decoded_max); int dns_label_apply_idna(const char *encoded, size_t encoded_size, char *de coded, size_t decoded_max);
int dns_label_undo_idna(const char *encoded, size_t encoded_size, char *dec oded, size_t decoded_max); int dns_label_undo_idna(const char *encoded, size_t encoded_size, char *dec oded, size_t decoded_max);
int dns_name_normalize(const char *s, char **_ret); int dns_name_normalize(const char *s, char **_ret);
unsigned long dns_name_hash_func(const void *s, const uint8_t hash_key[HASH _KEY_SIZE]); unsigned long dns_name_hash_func(const void *s, const uint8_t hash_key[HASH _KEY_SIZE]);
int dns_name_compare_func(const void *a, const void *b); int dns_name_compare_func(const void *a, const void *b);
extern const struct hash_ops dns_name_hash_ops;
int dns_name_equal(const char *x, const char *y); int dns_name_equal(const char *x, const char *y);
int dns_name_endswith(const char *name, const char *suffix); int dns_name_endswith(const char *name, const char *suffix);
int dns_name_reverse(int family, const union in_addr_union *a, char **ret); int dns_name_reverse(int family, const union in_addr_union *a, char **ret);
int dns_name_address(const char *p, int *family, union in_addr_union *a); int dns_name_address(const char *p, int *family, union in_addr_union *a);
int dns_name_root(const char *name); int dns_name_root(const char *name);
int dns_name_single_label(const char *name); int dns_name_single_label(const char *name);
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 resolved-dns-rr.h   resolved-dns-rr.h 
skipping to change at line 162 skipping to change at line 162
return (char*) key + sizeof(DnsResourceKey); return (char*) key + sizeof(DnsResourceKey);
} }
DnsResourceKey* dns_resource_key_new(uint16_t class, uint16_t type, const c har *name); DnsResourceKey* dns_resource_key_new(uint16_t class, uint16_t type, const c har *name);
DnsResourceKey* dns_resource_key_new_consume(uint16_t class, uint16_t type, char *name); DnsResourceKey* dns_resource_key_new_consume(uint16_t class, uint16_t type, char *name);
DnsResourceKey* dns_resource_key_ref(DnsResourceKey *key); DnsResourceKey* dns_resource_key_ref(DnsResourceKey *key);
DnsResourceKey* dns_resource_key_unref(DnsResourceKey *key); DnsResourceKey* dns_resource_key_unref(DnsResourceKey *key);
int dns_resource_key_equal(const DnsResourceKey *a, const DnsResourceKey *b ); int dns_resource_key_equal(const DnsResourceKey *a, const DnsResourceKey *b );
int dns_resource_key_match_rr(const DnsResourceKey *key, const DnsResourceR ecord *rr); int dns_resource_key_match_rr(const DnsResourceKey *key, const DnsResourceR ecord *rr);
int dns_resource_key_match_cname(const DnsResourceKey *key, const DnsResour ceRecord *rr); int dns_resource_key_match_cname(const DnsResourceKey *key, const DnsResour ceRecord *rr);
unsigned long dns_resource_key_hash_func(const void *i, const uint8_t hash_
key[HASH_KEY_SIZE]);
int dns_resource_key_compare_func(const void *a, const void *b);
int dns_resource_key_to_string(const DnsResourceKey *key, char **ret); int dns_resource_key_to_string(const DnsResourceKey *key, char **ret);
DEFINE_TRIVIAL_CLEANUP_FUNC(DnsResourceKey*, dns_resource_key_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(DnsResourceKey*, dns_resource_key_unref);
DnsResourceRecord* dns_resource_record_new(DnsResourceKey *key); DnsResourceRecord* dns_resource_record_new(DnsResourceKey *key);
DnsResourceRecord* dns_resource_record_new_full(uint16_t class, uint16_t ty pe, const char *name); DnsResourceRecord* dns_resource_record_new_full(uint16_t class, uint16_t ty pe, const char *name);
DnsResourceRecord* dns_resource_record_ref(DnsResourceRecord *rr); DnsResourceRecord* dns_resource_record_ref(DnsResourceRecord *rr);
DnsResourceRecord* dns_resource_record_unref(DnsResourceRecord *rr); DnsResourceRecord* dns_resource_record_unref(DnsResourceRecord *rr);
int dns_resource_record_new_reverse(DnsResourceRecord **ret, int family, co nst union in_addr_union *address, const char *name); int dns_resource_record_new_reverse(DnsResourceRecord **ret, int family, co nst union in_addr_union *address, const char *name);
int dns_resource_record_equal(const DnsResourceRecord *a, const DnsResource Record *b); int dns_resource_record_equal(const DnsResourceRecord *a, const DnsResource Record *b);
int dns_resource_record_to_string(const DnsResourceRecord *rr, char **ret); int dns_resource_record_to_string(const DnsResourceRecord *rr, char **ret);
DEFINE_TRIVIAL_CLEANUP_FUNC(DnsResourceRecord*, dns_resource_record_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(DnsResourceRecord*, dns_resource_record_unref);
const char *dns_class_to_string(uint16_t type); const char *dns_class_to_string(uint16_t type);
int dns_class_from_string(const char *name, uint16_t *class); int dns_class_from_string(const char *name, uint16_t *class);
extern const struct hash_ops dns_resource_key_hash_ops;
 End of changes. 2 change blocks. 
3 lines changed or deleted 0 lines changed or added


 resolved-dns-scope.h   resolved-dns-scope.h 
skipping to change at line 58 skipping to change at line 58
DnsProtocol protocol; DnsProtocol protocol;
int family; int family;
Link *link; Link *link;
char **domains; char **domains;
DnsCache cache; DnsCache cache;
DnsZone zone; DnsZone zone;
Hashmap *conflict_queue; OrderedHashmap *conflict_queue;
sd_event_source *conflict_event_source; sd_event_source *conflict_event_source;
RateLimit ratelimit; RateLimit ratelimit;
LIST_HEAD(DnsTransaction, transactions); LIST_HEAD(DnsTransaction, transactions);
LIST_FIELDS(DnsScope, scopes); LIST_FIELDS(DnsScope, scopes);
}; };
int dns_scope_new(Manager *m, DnsScope **ret, Link *l, DnsProtocol p, int f amily); int dns_scope_new(Manager *m, DnsScope **ret, Link *l, DnsProtocol p, int f amily);
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 resolved-dns-server.h   resolved-dns-server.h 
skipping to change at line 63 skipping to change at line 63
int dns_server_new( int dns_server_new(
Manager *m, Manager *m,
DnsServer **s, DnsServer **s,
DnsServerType type, DnsServerType type,
Link *l, Link *l,
int family, int family,
const union in_addr_union *address); const union in_addr_union *address);
DnsServer* dns_server_free(DnsServer *s); DnsServer* dns_server_free(DnsServer *s);
unsigned long dns_server_hash_func(const void *p, const uint8_t hash_key[HA extern const struct hash_ops dns_server_hash_ops;
SH_KEY_SIZE]);
int dns_server_compare_func(const void *a, const void *b);
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added


 resolved-manager.h   resolved-manager.h 
skipping to change at line 142 skipping to change at line 142
int manager_send(Manager *m, int fd, int ifindex, int family, const union i n_addr_union *addr, uint16_t port, DnsPacket *p); int manager_send(Manager *m, int fd, int ifindex, int family, const union i n_addr_union *addr, uint16_t port, DnsPacket *p);
int manager_recv(Manager *m, int fd, DnsProtocol protocol, DnsPacket **ret) ; int manager_recv(Manager *m, int fd, DnsProtocol protocol, DnsPacket **ret) ;
int manager_dns_ipv4_fd(Manager *m); int manager_dns_ipv4_fd(Manager *m);
int manager_dns_ipv6_fd(Manager *m); int manager_dns_ipv6_fd(Manager *m);
int manager_llmnr_ipv4_udp_fd(Manager *m); int manager_llmnr_ipv4_udp_fd(Manager *m);
int manager_llmnr_ipv6_udp_fd(Manager *m); int manager_llmnr_ipv6_udp_fd(Manager *m);
int manager_llmnr_ipv4_tcp_fd(Manager *m); int manager_llmnr_ipv4_tcp_fd(Manager *m);
int manager_llmnr_ipv6_tcp_fd(Manager *m); int manager_llmnr_ipv6_tcp_fd(Manager *m);
int manager_ifindex_is_loopback(Manager *m, int ifindex);
int manager_find_ifindex(Manager *m, int family, const union in_addr_union *in_addr); int manager_find_ifindex(Manager *m, int family, const union in_addr_union *in_addr);
LinkAddress* manager_find_link_address(Manager *m, int family, const union in_addr_union *in_addr); LinkAddress* manager_find_link_address(Manager *m, int family, const union in_addr_union *in_addr);
void manager_refresh_rrs(Manager *m); void manager_refresh_rrs(Manager *m);
int manager_next_hostname(Manager *m); int manager_next_hostname(Manager *m);
bool manager_our_packet(Manager *m, DnsPacket *p); bool manager_our_packet(Manager *m, DnsPacket *p);
DnsScope* manager_find_scope(Manager *m, DnsPacket *p); DnsScope* manager_find_scope(Manager *m, DnsPacket *p);
void manager_verify_all(Manager *m); void manager_verify_all(Manager *m);
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 rtnl-util.h   rtnl-util.h 
skipping to change at line 37 skipping to change at line 37
#include "sd-rtnl.h" #include "sd-rtnl.h"
int rtnl_message_new_synthetic_error(int error, uint32_t serial, sd_rtnl_me ssage **ret); int rtnl_message_new_synthetic_error(int error, uint32_t serial, sd_rtnl_me ssage **ret);
uint32_t rtnl_message_get_serial(sd_rtnl_message *m); uint32_t rtnl_message_get_serial(sd_rtnl_message *m);
void rtnl_message_seal(sd_rtnl_message *m); void rtnl_message_seal(sd_rtnl_message *m);
bool rtnl_message_type_is_link(uint16_t type); bool rtnl_message_type_is_link(uint16_t type);
bool rtnl_message_type_is_addr(uint16_t type); bool rtnl_message_type_is_addr(uint16_t type);
bool rtnl_message_type_is_route(uint16_t type); bool rtnl_message_type_is_route(uint16_t type);
int rtnl_set_link_name(sd_rtnl *rtnl, int ifindex, const char *name); int rtnl_set_link_name(sd_rtnl **rtnl, int ifindex, const char *name);
int rtnl_set_link_properties(sd_rtnl *rtnl, int ifindex, const char *alias, int rtnl_set_link_properties(sd_rtnl **rtnl, int ifindex, const char *alias
const struct ether_addr *mac, unsigned mtu); , const struct ether_addr *mac, unsigned mtu);
int rtnl_log_parse_error(int r); int rtnl_log_parse_error(int r);
int rtnl_log_create_error(int r); int rtnl_log_create_error(int r);
DEFINE_TRIVIAL_CLEANUP_FUNC(sd_rtnl*, sd_rtnl_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(sd_rtnl*, sd_rtnl_unref);
DEFINE_TRIVIAL_CLEANUP_FUNC(sd_rtnl_message*, sd_rtnl_message_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(sd_rtnl_message*, sd_rtnl_message_unref);
#define _cleanup_rtnl_unref_ _cleanup_(sd_rtnl_unrefp) #define _cleanup_rtnl_unref_ _cleanup_(sd_rtnl_unrefp)
#define _cleanup_rtnl_message_unref_ _cleanup_(sd_rtnl_message_unrefp) #define _cleanup_rtnl_message_unref_ _cleanup_(sd_rtnl_message_unrefp)
 End of changes. 1 change blocks. 
3 lines changed or deleted 3 lines changed or added


 sd-bus-protocol.h   sd-bus-protocol.h 
skipping to change at line 99 skipping to change at line 99
#define SD_BUS_ERROR_UNKNOWN_METHOD "org.freedesktop.DBus.Error .UnknownMethod" #define SD_BUS_ERROR_UNKNOWN_METHOD "org.freedesktop.DBus.Error .UnknownMethod"
#define SD_BUS_ERROR_UNKNOWN_OBJECT "org.freedesktop.DBus.Error .UnknownObject" #define SD_BUS_ERROR_UNKNOWN_OBJECT "org.freedesktop.DBus.Error .UnknownObject"
#define SD_BUS_ERROR_UNKNOWN_INTERFACE "org.freedesktop.DBus.Error .UnknownInterface" #define SD_BUS_ERROR_UNKNOWN_INTERFACE "org.freedesktop.DBus.Error .UnknownInterface"
#define SD_BUS_ERROR_UNKNOWN_PROPERTY "org.freedesktop.DBus.Error .UnknownProperty" #define SD_BUS_ERROR_UNKNOWN_PROPERTY "org.freedesktop.DBus.Error .UnknownProperty"
#define SD_BUS_ERROR_PROPERTY_READ_ONLY "org.freedesktop.DBus.Error .PropertyReadOnly" #define SD_BUS_ERROR_PROPERTY_READ_ONLY "org.freedesktop.DBus.Error .PropertyReadOnly"
#define SD_BUS_ERROR_UNIX_PROCESS_ID_UNKNOWN "org.freedesktop.DBus.Error .UnixProcessIdUnknown" #define SD_BUS_ERROR_UNIX_PROCESS_ID_UNKNOWN "org.freedesktop.DBus.Error .UnixProcessIdUnknown"
#define SD_BUS_ERROR_INVALID_SIGNATURE "org.freedesktop.DBus.Error .InvalidSignature" #define SD_BUS_ERROR_INVALID_SIGNATURE "org.freedesktop.DBus.Error .InvalidSignature"
#define SD_BUS_ERROR_INCONSISTENT_MESSAGE "org.freedesktop.DBus.Error .InconsistentMessage" #define SD_BUS_ERROR_INCONSISTENT_MESSAGE "org.freedesktop.DBus.Error .InconsistentMessage"
#define SD_BUS_ERROR_MATCH_RULE_NOT_FOUND "org.freedesktop.DBus.Error .MatchRuleNotFound" #define SD_BUS_ERROR_MATCH_RULE_NOT_FOUND "org.freedesktop.DBus.Error .MatchRuleNotFound"
#define SD_BUS_ERROR_MATCH_RULE_INVALID "org.freedesktop.DBus.Error .MatchRuleInvalid" #define SD_BUS_ERROR_MATCH_RULE_INVALID "org.freedesktop.DBus.Error .MatchRuleInvalid"
#define SD_BUS_ERROR_INTERACTIVE_AUTHORIZATION_REQUIRED \
"org.freedesktop.DBus.Error
.InteractiveAuthorizationRequired"
_SD_END_DECLARATIONS; _SD_END_DECLARATIONS;
#endif #endif
 End of changes. 1 change blocks. 
0 lines changed or deleted 3 lines changed or added


 sd-bus.h   sd-bus.h 
skipping to change at line 31 skipping to change at line 31
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#include <inttypes.h> #include <inttypes.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/uio.h> #include <sys/uio.h>
#include "sd-id128.h" #include "sd-id128.h"
#include "sd-event.h" #include "sd-event.h"
#include "memfd.h"
#include "_sd-common.h" #include "_sd-common.h"
_SD_BEGIN_DECLARATIONS; _SD_BEGIN_DECLARATIONS;
/* Types */ /* Types */
typedef struct sd_bus sd_bus; typedef struct sd_bus sd_bus;
typedef struct sd_bus_message sd_bus_message; typedef struct sd_bus_message sd_bus_message;
typedef struct sd_bus_slot sd_bus_slot; typedef struct sd_bus_slot sd_bus_slot;
typedef struct sd_bus_creds sd_bus_creds; typedef struct sd_bus_creds sd_bus_creds;
skipping to change at line 135 skipping to change at line 134
int sd_bus_try_close(sd_bus *bus); int sd_bus_try_close(sd_bus *bus);
void sd_bus_close(sd_bus *bus); void sd_bus_close(sd_bus *bus);
sd_bus *sd_bus_ref(sd_bus *bus); sd_bus *sd_bus_ref(sd_bus *bus);
sd_bus *sd_bus_unref(sd_bus *bus); sd_bus *sd_bus_unref(sd_bus *bus);
int sd_bus_is_open(sd_bus *bus); int sd_bus_is_open(sd_bus *bus);
int sd_bus_can_send(sd_bus *bus, char type); int sd_bus_can_send(sd_bus *bus, char type);
int sd_bus_get_server_id(sd_bus *bus, sd_id128_t *peer); int sd_bus_get_server_id(sd_bus *bus, sd_id128_t *peer);
int sd_bus_get_peer_creds(sd_bus *bus, uint64_t creds_mask, sd_bus_creds ** ret); int sd_bus_get_owner_creds(sd_bus *bus, uint64_t creds_mask, sd_bus_creds * *ret);
int sd_bus_get_name(sd_bus *bus, const char **name); int sd_bus_get_name(sd_bus *bus, const char **name);
int sd_bus_get_tid(sd_bus *bus, pid_t *tid); int sd_bus_get_tid(sd_bus *bus, pid_t *tid);
int sd_bus_send(sd_bus *bus, sd_bus_message *m, uint64_t *cookie); int sd_bus_send(sd_bus *bus, sd_bus_message *m, uint64_t *cookie);
int sd_bus_send_to(sd_bus *bus, sd_bus_message *m, const char *destination, uint64_t *cookie); int sd_bus_send_to(sd_bus *bus, sd_bus_message *m, const char *destination, uint64_t *cookie);
int sd_bus_call(sd_bus *bus, sd_bus_message *m, uint64_t usec, sd_bus_error *ret_error, sd_bus_message **reply); int sd_bus_call(sd_bus *bus, sd_bus_message *m, uint64_t usec, sd_bus_error *ret_error, sd_bus_message **reply);
int sd_bus_call_async(sd_bus *bus, sd_bus_slot **slot, sd_bus_message *m, s d_bus_message_handler_t callback, void *userdata, uint64_t usec); int sd_bus_call_async(sd_bus *bus, sd_bus_slot **slot, sd_bus_message *m, s d_bus_message_handler_t callback, void *userdata, uint64_t usec);
int sd_bus_get_fd(sd_bus *bus); int sd_bus_get_fd(sd_bus *bus);
int sd_bus_get_events(sd_bus *bus); int sd_bus_get_events(sd_bus *bus);
skipping to change at line 199 skipping to change at line 198
int sd_bus_message_new_method_errorf(sd_bus_message *call, sd_bus_message * *m, const char *name, const char *format, ...) _sd_printf_(4, 5); int sd_bus_message_new_method_errorf(sd_bus_message *call, sd_bus_message * *m, const char *name, const char *format, ...) _sd_printf_(4, 5);
int sd_bus_message_new_method_errno(sd_bus_message *call, sd_bus_message ** m, int error, const sd_bus_error *e); int sd_bus_message_new_method_errno(sd_bus_message *call, sd_bus_message ** m, int error, const sd_bus_error *e);
int sd_bus_message_new_method_errnof(sd_bus_message *call, sd_bus_message * *m, int error, const char *format, ...) _sd_printf_(4, 5); int sd_bus_message_new_method_errnof(sd_bus_message *call, sd_bus_message * *m, int error, const char *format, ...) _sd_printf_(4, 5);
sd_bus_message* sd_bus_message_ref(sd_bus_message *m); sd_bus_message* sd_bus_message_ref(sd_bus_message *m);
sd_bus_message* sd_bus_message_unref(sd_bus_message *m); sd_bus_message* sd_bus_message_unref(sd_bus_message *m);
int sd_bus_message_get_type(sd_bus_message *m, uint8_t *type); int sd_bus_message_get_type(sd_bus_message *m, uint8_t *type);
int sd_bus_message_get_cookie(sd_bus_message *m, uint64_t *cookie); int sd_bus_message_get_cookie(sd_bus_message *m, uint64_t *cookie);
int sd_bus_message_get_reply_cookie(sd_bus_message *m, uint64_t *cookie); int sd_bus_message_get_reply_cookie(sd_bus_message *m, uint64_t *cookie);
int sd_bus_message_get_priority(sd_bus_message *m, int64_t *priority);
int sd_bus_message_get_expect_reply(sd_bus_message *m); int sd_bus_message_get_expect_reply(sd_bus_message *m);
int sd_bus_message_get_auto_start(sd_bus_message *m); int sd_bus_message_get_auto_start(sd_bus_message *m);
int sd_bus_message_get_priority(sd_bus_message *m, int64_t *priority); int sd_bus_message_get_allow_interactive_authorization(sd_bus_message *m);
const char *sd_bus_message_get_signature(sd_bus_message *m, int complete); const char *sd_bus_message_get_signature(sd_bus_message *m, int complete);
const char *sd_bus_message_get_path(sd_bus_message *m); const char *sd_bus_message_get_path(sd_bus_message *m);
const char *sd_bus_message_get_interface(sd_bus_message *m); const char *sd_bus_message_get_interface(sd_bus_message *m);
const char *sd_bus_message_get_member(sd_bus_message *m); const char *sd_bus_message_get_member(sd_bus_message *m);
const char *sd_bus_message_get_destination(sd_bus_message *m); const char *sd_bus_message_get_destination(sd_bus_message *m);
const char *sd_bus_message_get_sender(sd_bus_message *m); const char *sd_bus_message_get_sender(sd_bus_message *m);
const sd_bus_error *sd_bus_message_get_error(sd_bus_message *m); const sd_bus_error *sd_bus_message_get_error(sd_bus_message *m);
int sd_bus_message_get_errno(sd_bus_message *m); int sd_bus_message_get_errno(sd_bus_message *m);
skipping to change at line 225 skipping to change at line 226
sd_bus* sd_bus_message_get_bus(sd_bus_message *m); sd_bus* sd_bus_message_get_bus(sd_bus_message *m);
sd_bus_creds *sd_bus_message_get_creds(sd_bus_message *m); /* do not unref the result */ sd_bus_creds *sd_bus_message_get_creds(sd_bus_message *m); /* do not unref the result */
int sd_bus_message_is_signal(sd_bus_message *m, const char *interface, cons t char *member); int sd_bus_message_is_signal(sd_bus_message *m, const char *interface, cons t char *member);
int sd_bus_message_is_method_call(sd_bus_message *m, const char *interface, const char *member); int sd_bus_message_is_method_call(sd_bus_message *m, const char *interface, const char *member);
int sd_bus_message_is_method_error(sd_bus_message *m, const char *name); int sd_bus_message_is_method_error(sd_bus_message *m, const char *name);
int sd_bus_message_set_expect_reply(sd_bus_message *m, int b); int sd_bus_message_set_expect_reply(sd_bus_message *m, int b);
int sd_bus_message_set_auto_start(sd_bus_message *m, int b); int sd_bus_message_set_auto_start(sd_bus_message *m, int b);
int sd_bus_message_set_allow_interactive_authorization(sd_bus_message *m, i
nt b);
int sd_bus_message_set_destination(sd_bus_message *m, const char *destinati on); int sd_bus_message_set_destination(sd_bus_message *m, const char *destinati on);
int sd_bus_message_set_priority(sd_bus_message *m, int64_t priority); int sd_bus_message_set_priority(sd_bus_message *m, int64_t priority);
int sd_bus_message_append(sd_bus_message *m, const char *types, ...); int sd_bus_message_append(sd_bus_message *m, const char *types, ...);
int sd_bus_message_append_basic(sd_bus_message *m, char type, const void *p ); int sd_bus_message_append_basic(sd_bus_message *m, char type, const void *p );
int sd_bus_message_append_array(sd_bus_message *m, char type, const void *p tr, size_t size); int sd_bus_message_append_array(sd_bus_message *m, char type, const void *p tr, size_t size);
int sd_bus_message_append_array_space(sd_bus_message *m, char type, size_t size, void **ptr); int sd_bus_message_append_array_space(sd_bus_message *m, char type, size_t size, void **ptr);
int sd_bus_message_append_array_iovec(sd_bus_message *m, char type, const s truct iovec *iov, unsigned n); int sd_bus_message_append_array_iovec(sd_bus_message *m, char type, const s truct iovec *iov, unsigned n);
int sd_bus_message_append_array_memfd(sd_bus_message *m, char type, int mem fd); int sd_bus_message_append_array_memfd(sd_bus_message *m, char type, int mem fd);
int sd_bus_message_append_string_space(sd_bus_message *m, size_t size, char **s); int sd_bus_message_append_string_space(sd_bus_message *m, size_t size, char **s);
skipping to change at line 260 skipping to change at line 263
int sd_bus_message_verify_type(sd_bus_message *m, char type, const char *co ntents); int sd_bus_message_verify_type(sd_bus_message *m, char type, const char *co ntents);
int sd_bus_message_at_end(sd_bus_message *m, int complete); int sd_bus_message_at_end(sd_bus_message *m, int complete);
int sd_bus_message_rewind(sd_bus_message *m, int complete); int sd_bus_message_rewind(sd_bus_message *m, int complete);
/* Bus management */ /* Bus management */
int sd_bus_get_unique_name(sd_bus *bus, const char **unique); int sd_bus_get_unique_name(sd_bus *bus, const char **unique);
int sd_bus_request_name(sd_bus *bus, const char *name, uint64_t flags); int sd_bus_request_name(sd_bus *bus, const char *name, uint64_t flags);
int sd_bus_release_name(sd_bus *bus, const char *name); int sd_bus_release_name(sd_bus *bus, const char *name);
int sd_bus_list_names(sd_bus *bus, char ***acquired, char ***activatable); /* free the results */ int sd_bus_list_names(sd_bus *bus, char ***acquired, char ***activatable); /* free the results */
int sd_bus_get_owner(sd_bus *bus, const char *name, uint64_t mask, sd_bus_c int sd_bus_get_name_creds(sd_bus *bus, const char *name, uint64_t mask, sd_
reds **creds); /* unref the result! */ bus_creds **creds); /* unref the result! */
int sd_bus_get_owner_machine_id(sd_bus *bus, const char *name, sd_id128_t * int sd_bus_get_name_machine_id(sd_bus *bus, const char *name, sd_id128_t *m
machine); achine);
/* Convenience calls */ /* Convenience calls */
int sd_bus_call_method(sd_bus *bus, const char *destination, const char *pa th, const char *interface, const char *member, sd_bus_error *ret_error, sd_ bus_message **reply, const char *types, ...); int sd_bus_call_method(sd_bus *bus, const char *destination, const char *pa th, const char *interface, const char *member, sd_bus_error *ret_error, sd_ bus_message **reply, const char *types, ...);
int sd_bus_get_property(sd_bus *bus, const char *destination, const char *p ath, const char *interface, const char *member, sd_bus_error *ret_error, sd _bus_message **reply, const char *type); int sd_bus_get_property(sd_bus *bus, const char *destination, const char *p ath, const char *interface, const char *member, sd_bus_error *ret_error, sd _bus_message **reply, const char *type);
int sd_bus_get_property_trivial(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_e rror, char type, void *ret_ptr); int sd_bus_get_property_trivial(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_e rror, char type, void *ret_ptr);
int sd_bus_get_property_string(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_er ror, char **ret); /* free the result! */ int sd_bus_get_property_string(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_er ror, char **ret); /* free the result! */
int sd_bus_get_property_strv(sd_bus *bus, const char *destination, const ch ar *path, const char *interface, const char *member, sd_bus_error *ret_erro r, char ***ret); /* free the result! */ int sd_bus_get_property_strv(sd_bus *bus, const char *destination, const ch ar *path, const char *interface, const char *member, sd_bus_error *ret_erro r, char ***ret); /* free the result! */
int sd_bus_set_property(sd_bus *bus, const char *destination, const char *p ath, const char *interface, const char *member, sd_bus_error *ret_error, co nst char *ret_type, ...); int sd_bus_set_property(sd_bus *bus, const char *destination, const char *p ath, const char *interface, const char *member, sd_bus_error *ret_error, co nst char *ret_type, ...);
 End of changes. 6 change blocks. 
7 lines changed or deleted 11 lines changed or added


 sd-dhcp-client.h   sd-dhcp-client.h 
skipping to change at line 51 skipping to change at line 51
typedef void (*sd_dhcp_client_cb_t)(sd_dhcp_client *client, int event, typedef void (*sd_dhcp_client_cb_t)(sd_dhcp_client *client, int event,
void *userdata); void *userdata);
int sd_dhcp_client_set_callback(sd_dhcp_client *client, sd_dhcp_client_cb_t cb, int sd_dhcp_client_set_callback(sd_dhcp_client *client, sd_dhcp_client_cb_t cb,
void *userdata); void *userdata);
int sd_dhcp_client_set_request_option(sd_dhcp_client *client, uint8_t optio n); int sd_dhcp_client_set_request_option(sd_dhcp_client *client, uint8_t optio n);
int sd_dhcp_client_set_request_address(sd_dhcp_client *client, int sd_dhcp_client_set_request_address(sd_dhcp_client *client,
const struct in_addr *last_address); const struct in_addr *last_address);
int sd_dhcp_client_set_request_broadcast(sd_dhcp_client *client, int broadc ast); int sd_dhcp_client_set_request_broadcast(sd_dhcp_client *client, int broadc ast);
int sd_dhcp_client_set_index(sd_dhcp_client *client, int interface_index); int sd_dhcp_client_set_index(sd_dhcp_client *client, int interface_index);
int sd_dhcp_client_set_mac(sd_dhcp_client *client, int sd_dhcp_client_set_mac(sd_dhcp_client *client, const uint8_t *addr,
const struct ether_addr *addr); size_t addr_len, uint16_t arp_type);
int sd_dhcp_client_set_mtu(sd_dhcp_client *client, uint32_t mtu); int sd_dhcp_client_set_mtu(sd_dhcp_client *client, uint32_t mtu);
int sd_dhcp_client_set_hostname(sd_dhcp_client *client, const char *hostnam e); int sd_dhcp_client_set_hostname(sd_dhcp_client *client, const char *hostnam e);
int sd_dhcp_client_set_vendor_class_identifier(sd_dhcp_client *client, cons t char *vci); int sd_dhcp_client_set_vendor_class_identifier(sd_dhcp_client *client, cons t char *vci);
int sd_dhcp_client_get_lease(sd_dhcp_client *client, sd_dhcp_lease **ret); int sd_dhcp_client_get_lease(sd_dhcp_client *client, sd_dhcp_lease **ret);
int sd_dhcp_client_stop(sd_dhcp_client *client); int sd_dhcp_client_stop(sd_dhcp_client *client);
int sd_dhcp_client_start(sd_dhcp_client *client); int sd_dhcp_client_start(sd_dhcp_client *client);
sd_dhcp_client *sd_dhcp_client_ref(sd_dhcp_client *client); sd_dhcp_client *sd_dhcp_client_ref(sd_dhcp_client *client);
sd_dhcp_client *sd_dhcp_client_unref(sd_dhcp_client *client); sd_dhcp_client *sd_dhcp_client_unref(sd_dhcp_client *client);
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 sd-dhcp6-client.h   sd-dhcp6-client.h 
skipping to change at line 46 skipping to change at line 46
}; };
typedef struct sd_dhcp6_client sd_dhcp6_client; typedef struct sd_dhcp6_client sd_dhcp6_client;
typedef void (*sd_dhcp6_client_cb_t)(sd_dhcp6_client *client, int event, typedef void (*sd_dhcp6_client_cb_t)(sd_dhcp6_client *client, int event,
void *userdata); void *userdata);
int sd_dhcp6_client_set_callback(sd_dhcp6_client *client, int sd_dhcp6_client_set_callback(sd_dhcp6_client *client,
sd_dhcp6_client_cb_t cb, void *userdata); sd_dhcp6_client_cb_t cb, void *userdata);
int sd_dhcp6_client_set_index(sd_dhcp6_client *client, int interface_index) ; int sd_dhcp6_client_set_index(sd_dhcp6_client *client, int interface_index) ;
int sd_dhcp6_client_set_mac(sd_dhcp6_client *client, int sd_dhcp6_client_set_mac(sd_dhcp6_client *client, const uint8_t *addr,
const struct ether_addr *mac_addr); size_t addr_len, uint16_t arp_type);
int sd_dhcp6_client_set_duid(sd_dhcp6_client *client, uint16_t type, uint8_
t *duid,
size_t duid_len);
int sd_dhcp6_client_set_request_option(sd_dhcp6_client *client, int sd_dhcp6_client_set_request_option(sd_dhcp6_client *client,
uint16_t option); uint16_t option);
int sd_dhcp6_client_get_lease(sd_dhcp6_client *client, sd_dhcp6_lease **ret ); int sd_dhcp6_client_get_lease(sd_dhcp6_client *client, sd_dhcp6_lease **ret );
int sd_dhcp6_client_stop(sd_dhcp6_client *client); int sd_dhcp6_client_stop(sd_dhcp6_client *client);
int sd_dhcp6_client_start(sd_dhcp6_client *client); int sd_dhcp6_client_start(sd_dhcp6_client *client);
int sd_dhcp6_client_attach_event(sd_dhcp6_client *client, sd_event *event, int sd_dhcp6_client_attach_event(sd_dhcp6_client *client, sd_event *event,
int priority); int priority);
int sd_dhcp6_client_detach_event(sd_dhcp6_client *client); int sd_dhcp6_client_detach_event(sd_dhcp6_client *client);
 End of changes. 1 change blocks. 
2 lines changed or deleted 5 lines changed or added


 sd-event.h   sd-event.h 
skipping to change at line 55 skipping to change at line 55
typedef struct sd_event_source sd_event_source; typedef struct sd_event_source sd_event_source;
enum { enum {
SD_EVENT_OFF = 0, SD_EVENT_OFF = 0,
SD_EVENT_ON = 1, SD_EVENT_ON = 1,
SD_EVENT_ONESHOT = -1 SD_EVENT_ONESHOT = -1
}; };
enum { enum {
SD_EVENT_PASSIVE, SD_EVENT_PASSIVE,
SD_EVENT_PREPARED,
SD_EVENT_PENDING,
SD_EVENT_RUNNING, SD_EVENT_RUNNING,
SD_EVENT_EXITING, SD_EVENT_EXITING,
SD_EVENT_FINISHED SD_EVENT_FINISHED
}; };
enum { enum {
/* And everything in-between and outside is good too */ /* And everything in-between and outside is good too */
SD_EVENT_PRIORITY_IMPORTANT = -100, SD_EVENT_PRIORITY_IMPORTANT = -100,
SD_EVENT_PRIORITY_NORMAL = 0, SD_EVENT_PRIORITY_NORMAL = 0,
SD_EVENT_PRIORITY_IDLE = 100 SD_EVENT_PRIORITY_IDLE = 100
skipping to change at line 87 skipping to change at line 89
sd_event* sd_event_unref(sd_event *e); sd_event* sd_event_unref(sd_event *e);
int sd_event_add_io(sd_event *e, sd_event_source **s, int fd, uint32_t even ts, sd_event_io_handler_t callback, void *userdata); int sd_event_add_io(sd_event *e, sd_event_source **s, int fd, uint32_t even ts, sd_event_io_handler_t callback, void *userdata);
int sd_event_add_time(sd_event *e, sd_event_source **s, clockid_t clock, ui nt64_t usec, uint64_t accuracy, sd_event_time_handler_t callback, void *use rdata); int sd_event_add_time(sd_event *e, sd_event_source **s, clockid_t clock, ui nt64_t usec, uint64_t accuracy, sd_event_time_handler_t callback, void *use rdata);
int sd_event_add_signal(sd_event *e, sd_event_source **s, int sig, sd_event _signal_handler_t callback, void *userdata); int sd_event_add_signal(sd_event *e, sd_event_source **s, int sig, sd_event _signal_handler_t callback, void *userdata);
int sd_event_add_child(sd_event *e, sd_event_source **s, pid_t pid, int opt ions, sd_event_child_handler_t callback, void *userdata); int sd_event_add_child(sd_event *e, sd_event_source **s, pid_t pid, int opt ions, sd_event_child_handler_t callback, void *userdata);
int sd_event_add_defer(sd_event *e, sd_event_source **s, sd_event_handler_t callback, void *userdata); int sd_event_add_defer(sd_event *e, sd_event_source **s, sd_event_handler_t callback, void *userdata);
int sd_event_add_post(sd_event *e, sd_event_source **s, sd_event_handler_t callback, void *userdata); int sd_event_add_post(sd_event *e, sd_event_source **s, sd_event_handler_t callback, void *userdata);
int sd_event_add_exit(sd_event *e, sd_event_source **s, sd_event_handler_t callback, void *userdata); int sd_event_add_exit(sd_event *e, sd_event_source **s, sd_event_handler_t callback, void *userdata);
int sd_event_prepare(sd_event *e);
int sd_event_wait(sd_event *e, uint64_t timeout);
int sd_event_dispatch(sd_event *e);
int sd_event_run(sd_event *e, uint64_t timeout); int sd_event_run(sd_event *e, uint64_t timeout);
int sd_event_loop(sd_event *e); int sd_event_loop(sd_event *e);
int sd_event_exit(sd_event *e, int code); int sd_event_exit(sd_event *e, int code);
int sd_event_now(sd_event *e, clockid_t clock, uint64_t *usec); int sd_event_now(sd_event *e, clockid_t clock, uint64_t *usec);
int sd_event_get_fd(sd_event *e);
int sd_event_get_state(sd_event *e); int sd_event_get_state(sd_event *e);
int sd_event_get_tid(sd_event *e, pid_t *tid); int sd_event_get_tid(sd_event *e, pid_t *tid);
int sd_event_get_exit_code(sd_event *e, int *code); int sd_event_get_exit_code(sd_event *e, int *code);
int sd_event_set_watchdog(sd_event *e, int b); int sd_event_set_watchdog(sd_event *e, int b);
int sd_event_get_watchdog(sd_event *e); int sd_event_get_watchdog(sd_event *e);
sd_event_source* sd_event_source_ref(sd_event_source *s); sd_event_source* sd_event_source_ref(sd_event_source *s);
sd_event_source* sd_event_source_unref(sd_event_source *s); sd_event_source* sd_event_source_unref(sd_event_source *s);
sd_event *sd_event_source_get_event(sd_event_source *s); sd_event *sd_event_source_get_event(sd_event_source *s);
void* sd_event_source_get_userdata(sd_event_source *s); void* sd_event_source_get_userdata(sd_event_source *s);
void* sd_event_source_set_userdata(sd_event_source *s, void *userdata); void* sd_event_source_set_userdata(sd_event_source *s, void *userdata);
int sd_event_source_set_name(sd_event_source *s, const char *name);
int sd_event_source_get_name(sd_event_source *s, const char **name);
int sd_event_source_set_prepare(sd_event_source *s, sd_event_handler_t call back); int sd_event_source_set_prepare(sd_event_source *s, sd_event_handler_t call back);
int sd_event_source_get_pending(sd_event_source *s); int sd_event_source_get_pending(sd_event_source *s);
int sd_event_source_get_priority(sd_event_source *s, int64_t *priority); int sd_event_source_get_priority(sd_event_source *s, int64_t *priority);
int sd_event_source_set_priority(sd_event_source *s, int64_t priority); int sd_event_source_set_priority(sd_event_source *s, int64_t priority);
int sd_event_source_get_enabled(sd_event_source *s, int *enabled); int sd_event_source_get_enabled(sd_event_source *s, int *enabled);
int sd_event_source_set_enabled(sd_event_source *s, int enabled); int sd_event_source_set_enabled(sd_event_source *s, int enabled);
int sd_event_source_get_io_fd(sd_event_source *s); int sd_event_source_get_io_fd(sd_event_source *s);
int sd_event_source_set_io_fd(sd_event_source *s, int fd); int sd_event_source_set_io_fd(sd_event_source *s, int fd);
int sd_event_source_get_io_events(sd_event_source *s, uint32_t* events); int sd_event_source_get_io_events(sd_event_source *s, uint32_t* events);
int sd_event_source_set_io_events(sd_event_source *s, uint32_t events); int sd_event_source_set_io_events(sd_event_source *s, uint32_t events);
 End of changes. 4 change blocks. 
0 lines changed or deleted 8 lines changed or added


 sd-login.h   sd-login.h 
skipping to change at line 150 skipping to change at line 150
/* Determine the (PAM) service name this session was registered by. */ /* Determine the (PAM) service name this session was registered by. */
int sd_session_get_service(const char *session, char **service); int sd_session_get_service(const char *session, char **service);
/* Determine the type of this session, i.e. one of "tty", "x11", "wayland", "mir" or "unspecified". */ /* Determine the type of this session, i.e. one of "tty", "x11", "wayland", "mir" or "unspecified". */
int sd_session_get_type(const char *session, char **type); int sd_session_get_type(const char *session, char **type);
/* Determine the class of this session, i.e. one of "user", "greeter" or "l ock-screen". */ /* Determine the class of this session, i.e. one of "user", "greeter" or "l ock-screen". */
int sd_session_get_class(const char *session, char **clazz); int sd_session_get_class(const char *session, char **clazz);
/* Determine the desktop brand of this session, i.e. something like "GNOME"
, "KDE" or "systemd-console". */
int sd_session_get_desktop(const char *session, char **desktop);
/* Determine the X11 display of this session. */ /* Determine the X11 display of this session. */
int sd_session_get_display(const char *session, char **display); int sd_session_get_display(const char *session, char **display);
/* Determine the remote host of this session. */ /* Determine the remote host of this session. */
int sd_session_get_remote_host(const char *session, char **remote_host); int sd_session_get_remote_host(const char *session, char **remote_host);
/* Determine the remote user of this session (if provided by PAM). */ /* Determine the remote user of this session (if provided by PAM). */
int sd_session_get_remote_user(const char *session, char **remote_user); int sd_session_get_remote_user(const char *session, char **remote_user);
/* Determine the TTY of this session. */ /* Determine the TTY of this session. */
 End of changes. 1 change blocks. 
0 lines changed or deleted 4 lines changed or added


 sd-network.h   sd-network.h 
skipping to change at line 64 skipping to change at line 64
* Possible return codes: * Possible return codes:
* -ENODATA: networkd is not aware of any links * -ENODATA: networkd is not aware of any links
*/ */
int sd_network_get_operational_state(char **state); int sd_network_get_operational_state(char **state);
/* Get DNS entries for all links. These are string representations of /* Get DNS entries for all links. These are string representations of
* IP addresses */ * IP addresses */
int sd_network_get_dns(char ***dns); int sd_network_get_dns(char ***dns);
/* Get NTP entries for all links. These are domain names or string /* Get NTP entries for all links. These are domain names or string
* reperesentations of IP addresses */ * representations of IP addresses */
int sd_network_get_ntp(char ***ntp); int sd_network_get_ntp(char ***ntp);
/* Get the search/routing domains for all links. */ /* Get the search/routing domains for all links. */
int sd_network_get_domains(char ***domains); int sd_network_get_domains(char ***domains);
/* Get setup state from ifindex. /* Get setup state from ifindex.
* Possible states: * Possible states:
* pending: udev is still processing the link, we don't yet know if we wi ll manage it * pending: udev is still processing the link, we don't yet know if we wi ll manage it
* failed: networkd failed to manage the link * failed: networkd failed to manage the link
* configuring: in the process of retrieving configuration or configuring the link * configuring: in the process of retrieving configuration or configuring the link
* configured: link configured successfully * configured: link configured successfully
* unmanaged: networkd is not handling the link * unmanaged: networkd is not handling the link
* linger: the link is gone, but has not yet been dropped by networkd * linger: the link is gone, but has not yet been dropped by networkd
* Possible return codes: * Possible return codes:
* -ENODATA: networkd is not aware of the link * -ENODATA: networkd is not aware of the link
*/ */
int sd_network_link_get_setup_state(int ifindex, char **state); int sd_network_link_get_setup_state(int ifindex, char **state);
/* Get operatinal state from ifindex. /* Get operational state from ifindex.
* Possible states: * Possible states:
* off: the device is powered down * off: the device is powered down
* no-carrier: the device is powered up, but it does not yet have a carri er * no-carrier: the device is powered up, but it does not yet have a carri er
* dormant: the device has a carrier, but is not yet ready for normal tra ffic * dormant: the device has a carrier, but is not yet ready for normal tra ffic
* carrier: the link has a carrier * carrier: the link has a carrier
* degraded: the link has carrier and addresses valid on the local link c onfigured * degraded: the link has carrier and addresses valid on the local link c onfigured
* routable: the link has carrier and routable address configured * routable: the link has carrier and routable address configured
* Possible return codes: * Possible return codes:
* -ENODATA: networkd is not aware of the link * -ENODATA: networkd is not aware of the link
*/ */
int sd_network_link_get_operational_state(int ifindex, char **state); int sd_network_link_get_operational_state(int ifindex, char **state);
/* Get path to .network file applied to link */
int sd_network_link_get_network_file(int ifindex, char **filename);
/* Get DNS entries for a given link. These are string representations of /* Get DNS entries for a given link. These are string representations of
* IP addresses */ * IP addresses */
int sd_network_link_get_dns(int ifindex, char ***addr); int sd_network_link_get_dns(int ifindex, char ***addr);
/* Get NTP entries for a given link. These are domain names or string /* Get NTP entries for a given link. These are domain names or string
* reperesentations of IP addresses */ * representations of IP addresses */
int sd_network_link_get_ntp(int ifindex, char ***addr); int sd_network_link_get_ntp(int ifindex, char ***addr);
/* Indicates whether or not LLMNR should be enabled for the link /* Indicates whether or not LLMNR should be enabled for the link
* Possible levels of support: yes, no, resolve * Possible levels of support: yes, no, resolve
* Possible return codes: * Possible return codes:
* -ENODATA: networkd is not aware of the link*/ * -ENODATA: networkd is not aware of the link
*/
int sd_network_link_get_llmnr(int ifindex, char **llmnr); int sd_network_link_get_llmnr(int ifindex, char **llmnr);
/* Get the DNS domain names for a given link. */ /* Get the DNS domain names for a given link. */
int sd_network_link_get_domains(int ifindex, char ***domains); int sd_network_link_get_domains(int ifindex, char ***domains);
/* Returns whether or not domains that don't match any link should be resol ved /* Returns whether or not domains that don't match any link should be resol ved
* on this link. 1 for yes, 0 for no and negative value for error */ * on this link. 1 for yes, 0 for no and negative value for error */
int sd_network_link_get_wildcard_domain(int ifindex); int sd_network_link_get_wildcard_domain(int ifindex);
/* Monitor object */ /* Monitor object */
 End of changes. 5 change blocks. 
4 lines changed or deleted 8 lines changed or added


 selinux-access.h   selinux-access.h 
skipping to change at line 27 skipping to change at line 27
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#include "sd-bus.h" #include "sd-bus.h"
#include "bus-error.h" #include "bus-error.h"
#include "bus-util.h" #include "bus-util.h"
#include "manager.h"
void selinux_access_free(void); void mac_selinux_access_free(void);
int selinux_generic_access_check(sd_bus_message *message, const char *path, int mac_selinux_generic_access_check(sd_bus_message *message, const char *p
const char *permission, sd_bus_error *error); ath, const char *permission, sd_bus_error *error);
int mac_selinux_unit_access_check_strv(char **units, sd_bus_message *messag
e, Manager *m, const char *permission, sd_bus_error *error);
#ifdef HAVE_SELINUX #ifdef HAVE_SELINUX
#define selinux_access_check(message, permission, error) \ #define mac_selinux_access_check(message, permission, error) \
selinux_generic_access_check((message), NULL, (permission), (error) mac_selinux_generic_access_check((message), NULL, (permission), (er
) ror))
#define selinux_unit_access_check(unit, message, permission, error) \ #define mac_selinux_unit_access_check(unit, message, permission, error) \
({ \ ({ \
Unit *_unit = (unit); \ Unit *_unit = (unit); \
selinux_generic_access_check((message), _unit->fragment_pat h ?: _unit->fragment_path, (permission), (error)); \ mac_selinux_generic_access_check((message), _unit->fragment _path ?: _unit->fragment_path, (permission), (error)); \
}) })
#else #else
#define selinux_access_check(message, permission, error) 0 #define mac_selinux_access_check(message, permission, error) 0
#define selinux_unit_access_check(unit, message, permission, error) 0 #define mac_selinux_unit_access_check(unit, message, permission, error) 0
#endif #endif
 End of changes. 7 change blocks. 
10 lines changed or deleted 14 lines changed or added


 selinux-setup.h   selinux-setup.h 
skipping to change at line 26 skipping to change at line 26
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#include <stdbool.h> #include <stdbool.h>
int selinux_setup(bool *loaded_policy); int mac_selinux_setup(bool *loaded_policy);
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added


 selinux-util.h   selinux-util.h 
skipping to change at line 24 skipping to change at line 24
systemd is distributed in the hope that it will be useful, but systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#include <sys/socket.h>
#include <stdio.h>
#include <stdbool.h> #include <stdbool.h>
bool use_selinux(void); bool mac_selinux_use(void);
void retest_selinux(void); void mac_selinux_retest(void);
int mac_selinux_init(const char *prefix);
void mac_selinux_finish(void);
int mac_selinux_fix(const char *path, bool ignore_enoent, bool ignore_erofs
);
int mac_selinux_apply(const char *path, const char *label);
int mac_selinux_get_create_label_from_exe(const char *exe, char **label);
int mac_selinux_get_our_label(char **label);
int mac_selinux_get_child_mls_label(int socket_fd, const char *exec, char *
*label);
void mac_selinux_free(char *label);
int mac_selinux_create_file_prepare(const char *path, mode_t mode);
void mac_selinux_create_file_clear(void);
int mac_selinux_create_socket_prepare(const char *label);
void mac_selinux_create_socket_clear(void);
int mac_selinux_bind(int fd, const struct sockaddr *addr, socklen_t addrlen
);
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added


 service.h   service.h 
skipping to change at line 31 skipping to change at line 31
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
typedef struct Service Service; typedef struct Service Service;
#include "unit.h" #include "unit.h"
#include "path.h" #include "path.h"
#include "ratelimit.h" #include "ratelimit.h"
#include "kill.h" #include "kill.h"
#include "exit-status.h" #include "exit-status.h"
#include "failure-action.h"
typedef enum ServiceState { typedef enum ServiceState {
SERVICE_DEAD, SERVICE_DEAD,
SERVICE_START_PRE, SERVICE_START_PRE,
SERVICE_START, SERVICE_START,
SERVICE_START_POST, SERVICE_START_POST,
SERVICE_RUNNING, SERVICE_RUNNING,
SERVICE_EXITED, /* Nothing is running anymore, but Remai nAfterExit is true hence this is OK */ SERVICE_EXITED, /* Nothing is running anymore, but Remai nAfterExit is true hence this is OK */
SERVICE_RELOAD, SERVICE_RELOAD,
SERVICE_STOP, /* No STOP_PRE state, instead just regis ter multiple STOP executables */ SERVICE_STOP, /* No STOP_PRE state, instead just regis ter multiple STOP executables */
SERVICE_STOP_SIGABRT, /* Watchdog timeout */
SERVICE_STOP_SIGTERM, SERVICE_STOP_SIGTERM,
SERVICE_STOP_SIGKILL, SERVICE_STOP_SIGKILL,
SERVICE_STOP_POST, SERVICE_STOP_POST,
SERVICE_FINAL_SIGTERM, /* In case the STOP_POST executable hang s, we shoot that down, too */ SERVICE_FINAL_SIGTERM, /* In case the STOP_POST executable hang s, we shoot that down, too */
SERVICE_FINAL_SIGKILL, SERVICE_FINAL_SIGKILL,
SERVICE_FAILED, SERVICE_FAILED,
SERVICE_AUTO_RESTART, SERVICE_AUTO_RESTART,
_SERVICE_STATE_MAX, _SERVICE_STATE_MAX,
_SERVICE_STATE_INVALID = -1 _SERVICE_STATE_INVALID = -1
} ServiceState; } ServiceState;
skipping to change at line 94 skipping to change at line 96
} ServiceExecCommand; } ServiceExecCommand;
typedef enum NotifyAccess { typedef enum NotifyAccess {
NOTIFY_NONE, NOTIFY_NONE,
NOTIFY_ALL, NOTIFY_ALL,
NOTIFY_MAIN, NOTIFY_MAIN,
_NOTIFY_ACCESS_MAX, _NOTIFY_ACCESS_MAX,
_NOTIFY_ACCESS_INVALID = -1 _NOTIFY_ACCESS_INVALID = -1
} NotifyAccess; } NotifyAccess;
typedef enum NotifyState {
NOTIFY_UNKNOWN,
NOTIFY_READY,
NOTIFY_RELOADING,
NOTIFY_STOPPING,
_NOTIFY_STATE_MAX,
_NOTIFY_STATE_INVALID = -1
} NotifyState;
typedef enum ServiceResult { typedef enum ServiceResult {
SERVICE_SUCCESS, SERVICE_SUCCESS,
SERVICE_FAILURE_RESOURCES, SERVICE_FAILURE_RESOURCES,
SERVICE_FAILURE_TIMEOUT, SERVICE_FAILURE_TIMEOUT,
SERVICE_FAILURE_EXIT_CODE, SERVICE_FAILURE_EXIT_CODE,
SERVICE_FAILURE_SIGNAL, SERVICE_FAILURE_SIGNAL,
SERVICE_FAILURE_CORE_DUMP, SERVICE_FAILURE_CORE_DUMP,
SERVICE_FAILURE_WATCHDOG, SERVICE_FAILURE_WATCHDOG,
SERVICE_FAILURE_START_LIMIT, SERVICE_FAILURE_START_LIMIT,
_SERVICE_RESULT_MAX, _SERVICE_RESULT_MAX,
_SERVICE_RESULT_INVALID = -1 _SERVICE_RESULT_INVALID = -1
} ServiceResult; } ServiceResult;
typedef enum FailureAction {
SERVICE_FAILURE_ACTION_NONE,
SERVICE_FAILURE_ACTION_REBOOT,
SERVICE_FAILURE_ACTION_REBOOT_FORCE,
SERVICE_FAILURE_ACTION_REBOOT_IMMEDIATE,
_SERVICE_FAILURE_ACTION_MAX,
_SERVICE_FAILURE_ACTION_INVALID = -1
} FailureAction;
struct Service { struct Service {
Unit meta; Unit meta;
ServiceType type; ServiceType type;
ServiceRestart restart; ServiceRestart restart;
ExitStatusSet restart_prevent_status; ExitStatusSet restart_prevent_status;
ExitStatusSet restart_force_status; ExitStatusSet restart_force_status;
ExitStatusSet success_status; ExitStatusSet success_status;
/* If set we'll read the main daemon PID from this file */ /* If set we'll read the main daemon PID from this file */
skipping to change at line 163 skipping to change at line 165
ExecCommand *main_command; ExecCommand *main_command;
/* The ID of the control command currently being executed */ /* The ID of the control command currently being executed */
ServiceExecCommand control_command_id; ServiceExecCommand control_command_id;
/* Runtime data of the execution context */ /* Runtime data of the execution context */
ExecRuntime *exec_runtime; ExecRuntime *exec_runtime;
pid_t main_pid, control_pid; pid_t main_pid, control_pid;
int socket_fd; int socket_fd;
bool socket_fd_selinux_context_net;
int bus_endpoint_fd;
bool permissions_start_only; bool permissions_start_only;
bool root_directory_start_only; bool root_directory_start_only;
bool remain_after_exit; bool remain_after_exit;
bool guess_main_pid; bool guess_main_pid;
/* If we shut down, remember why */ /* If we shut down, remember why */
ServiceResult result; ServiceResult result;
ServiceResult reload_result; ServiceResult reload_result;
skipping to change at line 187 skipping to change at line 192
bool start_timeout_defined:1; bool start_timeout_defined:1;
#ifdef HAVE_SYSV_COMPAT #ifdef HAVE_SYSV_COMPAT
int sysv_start_priority; int sysv_start_priority;
#endif #endif
char *bus_name; char *bus_name;
char *status_text; char *status_text;
int status_errno; int status_errno;
FailureAction failure_action;
RateLimit start_limit; RateLimit start_limit;
FailureAction start_limit_action; FailureAction start_limit_action;
FailureAction failure_action;
char *reboot_arg; char *reboot_arg;
UnitRef accept_socket; UnitRef accept_socket;
sd_event_source *timer_event_source; sd_event_source *timer_event_source;
PathSpec *pid_file_pathspec; PathSpec *pid_file_pathspec;
NotifyAccess notify_access; NotifyAccess notify_access;
NotifyState notify_state;
}; };
extern const UnitVTable service_vtable; extern const UnitVTable service_vtable;
struct Socket; struct Socket;
int service_set_socket_fd(Service *s, int fd, struct Socket *socket); int service_set_socket_fd(Service *s, int fd, struct Socket *socket, bool s elinux_context_net);
const char* service_state_to_string(ServiceState i) _const_; const char* service_state_to_string(ServiceState i) _const_;
ServiceState service_state_from_string(const char *s) _pure_; ServiceState service_state_from_string(const char *s) _pure_;
const char* service_restart_to_string(ServiceRestart i) _const_; const char* service_restart_to_string(ServiceRestart i) _const_;
ServiceRestart service_restart_from_string(const char *s) _pure_; ServiceRestart service_restart_from_string(const char *s) _pure_;
const char* service_type_to_string(ServiceType i) _const_; const char* service_type_to_string(ServiceType i) _const_;
ServiceType service_type_from_string(const char *s) _pure_; ServiceType service_type_from_string(const char *s) _pure_;
const char* service_exec_command_to_string(ServiceExecCommand i) _const_; const char* service_exec_command_to_string(ServiceExecCommand i) _const_;
ServiceExecCommand service_exec_command_from_string(const char *s) _pure_; ServiceExecCommand service_exec_command_from_string(const char *s) _pure_;
const char* notify_access_to_string(NotifyAccess i) _const_; const char* notify_access_to_string(NotifyAccess i) _const_;
NotifyAccess notify_access_from_string(const char *s) _pure_; NotifyAccess notify_access_from_string(const char *s) _pure_;
const char* notify_state_to_string(NotifyState i) _const_;
NotifyState notify_state_from_string(const char *s) _pure_;
const char* service_result_to_string(ServiceResult i) _const_; const char* service_result_to_string(ServiceResult i) _const_;
ServiceResult service_result_from_string(const char *s) _pure_; ServiceResult service_result_from_string(const char *s) _pure_;
const char* failure_action_to_string(FailureAction i) _const_;
FailureAction failure_action_from_string(const char *s) _pure_;
 End of changes. 11 change blocks. 
12 lines changed or deleted 20 lines changed or added


 set.h   set.h 
skipping to change at line 35 skipping to change at line 35
* hashmap. That means that as a minor optimization a NULL set * hashmap. That means that as a minor optimization a NULL set
* object will be treated as empty set for all read * object will be treated as empty set for all read
* operations. That way it is not necessary to instantiate an object * operations. That way it is not necessary to instantiate an object
* for each set use. */ * for each set use. */
#include "hashmap.h" #include "hashmap.h"
#include "util.h" #include "util.h"
typedef struct Set Set; typedef struct Set Set;
Set *set_new(hash_func_t hash_func, compare_func_t compare_func); Set *set_new(const struct hash_ops *hash_ops);
void set_free(Set* s); void set_free(Set* s);
void set_free_free(Set *s); void set_free_free(Set *s);
Set* set_copy(Set *s); Set* set_copy(Set *s);
int set_ensure_allocated(Set **s, hash_func_t hash_func, compare_func_t com pare_func); int set_ensure_allocated(Set **s, const struct hash_ops *hash_ops);
int set_put(Set *s, void *value); int set_put(Set *s, void *value);
int set_consume(Set *s, void *value); int set_consume(Set *s, void *value);
int set_put_strdup(Set *s, const char *p); int set_put_strdup(Set *s, const char *p);
int set_put_strdupv(Set *s, char **l); int set_put_strdupv(Set *s, char **l);
int set_replace(Set *s, void *value); int set_replace(Set *s, void *value);
void *set_get(Set *s, void *value); void *set_get(Set *s, void *value);
bool set_contains(Set *s, void *value); bool set_contains(Set *s, void *value);
void *set_remove(Set *s, void *value); void *set_remove(Set *s, void *value);
int set_remove_and_put(Set *s, void *old_value, void *new_value); int set_remove_and_put(Set *s, void *old_value, void *new_value);
int set_merge(Set *s, Set *other); int set_merge(Set *s, Set *other);
void set_move(Set *s, Set *other); int set_reserve(Set *s, unsigned entries_add);
int set_move(Set *s, Set *other);
int set_move_one(Set *s, Set *other, void *value); int set_move_one(Set *s, Set *other, void *value);
unsigned set_size(Set *s); unsigned set_size(Set *s);
bool set_isempty(Set *s); bool set_isempty(Set *s);
void *set_iterate(Set *s, Iterator *i); void *set_iterate(Set *s, Iterator *i);
void *set_iterate_backwards(Set *s, Iterator *i);
void *set_iterate_skip(Set *s, void *value, Iterator *i);
void set_clear(Set *s); void set_clear(Set *s);
void set_clear_free(Set *s); void set_clear_free(Set *s);
void *set_steal_first(Set *s); void *set_steal_first(Set *s);
void* set_first(Set *s); void* set_first(Set *s);
void* set_last(Set *s);
char **set_get_strv(Set *s); char **set_get_strv(Set *s);
#define SET_FOREACH(e, s, i) \ #define SET_FOREACH(e, s, i) \
for ((i) = ITERATOR_FIRST, (e) = set_iterate((s), &(i)); (e); (e) = set_iterate((s), &(i))) for ((i) = ITERATOR_FIRST, (e) = set_iterate((s), &(i)); (e); (e) = set_iterate((s), &(i)))
#define SET_FOREACH_BACKWARDS(e, s, i) \
for ((i) = ITERATOR_LAST, (e) = set_iterate_backwards((s), &(i)); (
e); (e) = set_iterate_backwards((s), &(i)))
DEFINE_TRIVIAL_CLEANUP_FUNC(Set*, set_free); DEFINE_TRIVIAL_CLEANUP_FUNC(Set*, set_free);
DEFINE_TRIVIAL_CLEANUP_FUNC(Set*, set_free_free); DEFINE_TRIVIAL_CLEANUP_FUNC(Set*, set_free_free);
#define _cleanup_set_free_ _cleanup_(set_freep) #define _cleanup_set_free_ _cleanup_(set_freep)
#define _cleanup_set_free_free_ _cleanup_(set_free_freep) #define _cleanup_set_free_free_ _cleanup_(set_free_freep)
 End of changes. 6 change blocks. 
10 lines changed or deleted 4 lines changed or added


 smack-setup.h   smack-setup.h 
skipping to change at line 26 skipping to change at line 26
systemd is distributed in the hope that it will be useful, but systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
int smack_setup(bool *loaded_policy); int mac_smack_setup(bool *loaded_policy);
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added


 smack-util.h   smack-util.h 
skipping to change at line 28 skipping to change at line 28
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#include <stdbool.h> #include <stdbool.h>
#define SMACK_FLOOR_LABEL "_" bool mac_smack_use(void);
#define SMACK_STAR_LABEL "*"
bool use_smack(void); int mac_smack_fix(const char *path, bool ignore_enoent, bool ignore_erofs);
int smack_label_path(const char *path, const char *label); int mac_smack_apply(const char *path, const char *label);
int smack_label_fd(int fd, const char *label); int mac_smack_apply_fd(int fd, const char *label);
int smack_label_ip_in_fd(int fd, const char *label); int mac_smack_apply_ip_in_fd(int fd, const char *label);
int smack_label_ip_out_fd(int fd, const char *label); int mac_smack_apply_ip_out_fd(int fd, const char *label);
 End of changes. 3 change blocks. 
3 lines changed or deleted 2 lines changed or added


 socket.h   socket.h 
skipping to change at line 168 skipping to change at line 168
char *bind_to_device; char *bind_to_device;
char *tcp_congestion; char *tcp_congestion;
bool reuse_port; bool reuse_port;
long mq_maxmsg; long mq_maxmsg;
long mq_msgsize; long mq_msgsize;
char *smack; char *smack;
char *smack_ip_in; char *smack_ip_in;
char *smack_ip_out; char *smack_ip_out;
bool selinux_context_from_net;
char *user, *group; char *user, *group;
}; };
/* Called from the service code when collecting fds */ /* Called from the service code when collecting fds */
int socket_collect_fds(Socket *s, int **fds, unsigned *n_fds); int socket_collect_fds(Socket *s, int **fds, unsigned *n_fds);
/* Called from the service code when a per-connection service ended */ /* Called from the service code when a per-connection service ended */
void socket_connection_unref(Socket *s); void socket_connection_unref(Socket *s);
void socket_free_ports(Socket *s); void socket_free_ports(Socket *s);
 End of changes. 1 change blocks. 
0 lines changed or deleted 2 lines changed or added


 sparse-endian.h   sparse-endian.h 
skipping to change at line 24 skipping to change at line 24
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEAL INGS * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEAL INGS
* IN THE SOFTWARE. * IN THE SOFTWARE.
*/ */
#ifndef SPARSE_ENDIAN_H #ifndef SPARSE_ENDIAN_H
#define SPARSE_ENDIAN_H #define SPARSE_ENDIAN_H
#include <byteswap.h>
#include <endian.h> #include <endian.h>
#include <stdint.h> #include <stdint.h>
#ifdef __CHECKER__ #ifdef __CHECKER__
#define __bitwise __attribute__((bitwise)) #define __bitwise __attribute__((bitwise))
#define __force __attribute__((force)) #define __force __attribute__((force))
#else #else
#define __bitwise #define __bitwise
#define __force #define __force
#endif #endif
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 strv.h   strv.h 
skipping to change at line 31 skipping to change at line 31
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#include <stdarg.h> #include <stdarg.h>
#include <stdbool.h> #include <stdbool.h>
#include "util.h" #include "util.h"
char *strv_find(char **l, const char *name) _pure_; char *strv_find(char **l, const char *name) _pure_;
char *strv_find_prefix(char **l, const char *name) _pure_; char *strv_find_prefix(char **l, const char *name) _pure_;
char *strv_find_startswith(char **l, const char *name) _pure_;
void strv_free(char **l); void strv_free(char **l);
DEFINE_TRIVIAL_CLEANUP_FUNC(char**, strv_free); DEFINE_TRIVIAL_CLEANUP_FUNC(char**, strv_free);
#define _cleanup_strv_free_ _cleanup_(strv_freep) #define _cleanup_strv_free_ _cleanup_(strv_freep)
char **strv_copy(char * const *l); char **strv_copy(char * const *l);
unsigned strv_length(char * const *l) _pure_; unsigned strv_length(char * const *l) _pure_;
int strv_extend_strv(char ***a, char **b); int strv_extend_strv(char ***a, char **b);
int strv_extend_strv_concat(char ***a, char **b, const char *suffix); int strv_extend_strv_concat(char ***a, char **b, const char *suffix);
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 swap.h   swap.h 
skipping to change at line 66 skipping to change at line 66
SWAP_FAILURE_TIMEOUT, SWAP_FAILURE_TIMEOUT,
SWAP_FAILURE_EXIT_CODE, SWAP_FAILURE_EXIT_CODE,
SWAP_FAILURE_SIGNAL, SWAP_FAILURE_SIGNAL,
SWAP_FAILURE_CORE_DUMP, SWAP_FAILURE_CORE_DUMP,
_SWAP_RESULT_MAX, _SWAP_RESULT_MAX,
_SWAP_RESULT_INVALID = -1 _SWAP_RESULT_INVALID = -1
} SwapResult; } SwapResult;
typedef struct SwapParameters { typedef struct SwapParameters {
char *what; char *what;
char *options;
int priority; int priority;
bool noauto:1;
bool nofail:1;
} SwapParameters; } SwapParameters;
struct Swap { struct Swap {
Unit meta; Unit meta;
char *what; char *what;
/* If the device has already shown up, this is the device /* If the device has already shown up, this is the device
* node, which might be different from what, due to * node, which might be different from what, due to
* symlinks */ * symlinks */
 End of changes. 2 change blocks. 
2 lines changed or deleted 1 lines changed or added


 switch-root.h   switch-root.h 
skipping to change at line 24 skipping to change at line 24
systemd is distributed in the hope that it will be useful, but systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
int switch_root(const char *switch_root); int switch_root(const char *new_root, const char *oldroot, bool detach_oldr oot, unsigned long mountflags);
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added


 term-internal.h   term-internal.h 
skipping to change at line 27 skipping to change at line 27
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#pragma once #pragma once
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
#include "term.h"
#include "util.h" #include "util.h"
typedef struct term_char term_char_t; typedef struct term_char term_char_t;
typedef struct term_charbuf term_charbuf_t; typedef struct term_charbuf term_charbuf_t;
typedef struct term_color term_color;
typedef struct term_attr term_attr;
typedef struct term_cell term_cell; typedef struct term_cell term_cell;
typedef struct term_line term_line; typedef struct term_line term_line;
typedef struct term_page term_page; typedef struct term_page term_page;
typedef struct term_history term_history; typedef struct term_history term_history;
typedef struct term_utf8 term_utf8;
typedef struct term_seq term_seq;
typedef struct term_parser term_parser;
typedef uint32_t term_charset[96]; typedef uint32_t term_charset[96];
typedef struct term_state term_state;
typedef struct term_screen term_screen;
/* /*
* Miscellaneous * Miscellaneous
* Sundry things and external helpers. * Sundry things and external helpers.
*/ */
int mk_wcwidth(wchar_t ucs4); int mk_wcwidth(wchar_t ucs4);
int mk_wcwidth_cjk(wchar_t ucs4); int mk_wcwidth_cjk(wchar_t ucs4);
int mk_wcswidth(const wchar_t *str, size_t len); int mk_wcswidth(const wchar_t *str, size_t len);
int mk_wcswidth_cjk(const wchar_t *str, size_t len); int mk_wcswidth_cjk(const wchar_t *str, size_t len);
/* /*
* Ageing
* Redrawing terminals is quite expensive. Therefore, we avoid redrawing on
* each single modification and mark modified cells instead. This way, we k
now
* which cells to redraw on the next frame. However, a single DIRTY flag is
not
* enough for double/triple buffered screens, hence, we use an AGE field fo
r
* each cell. If the cell is modified, we simply increase the age by one. E
ach
* framebuffer can then remember its last rendered age and request an updat
e of
* all newer cells.
* TERM_AGE_NULL is special. If used as cell age, the cell must always be
* redrawn (forced update). If used as framebuffer age, all cells are drawn
.
* This way, we can allow integer wrap-arounds.
*/
typedef uint64_t term_age_t;
#define TERM_AGE_NULL 0
/*
* Characters * Characters
* Each cell in a terminal page contains only a single character. This is * Each cell in a terminal page contains only a single character. This is
* usually a single UCS-4 value. However, Unicode allows combining-characte rs, * usually a single UCS-4 value. However, Unicode allows combining-characte rs,
* therefore, the number of UCS-4 characters per cell must be unlimited. Th e * therefore, the number of UCS-4 characters per cell must be unlimited. Th e
* term_char_t object wraps the internal combining char API so it can be * term_char_t object wraps the internal combining char API so it can be
* treated as a single object. * treated as a single object.
*/ */
struct term_char { struct term_char {
/* never access this value directly */ /* never access this value directly */
skipping to change at line 146 skipping to change at line 123
return TERM_CHAR_NULL; return TERM_CHAR_NULL;
} }
/* gcc _cleanup_ helpers */ /* gcc _cleanup_ helpers */
#define _term_char_free_ _cleanup_(term_char_freep) #define _term_char_free_ _cleanup_(term_char_freep)
static inline void term_char_freep(term_char_t *p) { static inline void term_char_freep(term_char_t *p) {
term_char_free(*p); term_char_free(*p);
} }
/* /*
* Attributes
* Each cell in a terminal page can have its own set of attributes. These a
lter
* the behavior of the renderer for this single cell. We use term_attr to
* specify attributes.
* The only non-obvious field is "ccode" for foreground and background colo
rs.
* This field contains the terminal color-code in case no full RGB informat
ion
* was given by the host. It is also required for dynamic color palettes. I
f it
* is set to TERM_CCODE_RGB, the "red", "green" and "blue" fields contain t
he
* full RGB color.
*/
enum {
/* special color-codes */
TERM_CCODE_DEFAULT, /*
default foreground/background color */
TERM_CCODE_256, /*
256color code */
TERM_CCODE_RGB, /*
color is specified as RGB */
/* dark color-codes */
TERM_CCODE_BLACK,
TERM_CCODE_RED,
TERM_CCODE_GREEN,
TERM_CCODE_YELLOW,
TERM_CCODE_BLUE,
TERM_CCODE_MAGENTA,
TERM_CCODE_CYAN,
TERM_CCODE_WHITE, /*
technically: light grey */
/* light color-codes */
TERM_CCODE_LIGHT_BLACK = TERM_CCODE_BLACK + 8, /*
technically: dark grey */
TERM_CCODE_LIGHT_RED = TERM_CCODE_RED + 8,
TERM_CCODE_LIGHT_GREEN = TERM_CCODE_GREEN + 8,
TERM_CCODE_LIGHT_YELLOW = TERM_CCODE_YELLOW + 8,
TERM_CCODE_LIGHT_BLUE = TERM_CCODE_BLUE + 8,
TERM_CCODE_LIGHT_MAGENTA = TERM_CCODE_MAGENTA + 8,
TERM_CCODE_LIGHT_CYAN = TERM_CCODE_CYAN + 8,
TERM_CCODE_LIGHT_WHITE = TERM_CCODE_WHITE + 8,
TERM_CCODE_CNT,
};
struct term_color {
uint8_t ccode;
uint8_t c256;
uint8_t red;
uint8_t green;
uint8_t blue;
};
struct term_attr {
term_color fg; /* foreground color */
term_color bg; /* background color */
unsigned int bold : 1; /* bold font */
unsigned int italic : 1; /* italic font */
unsigned int underline : 1; /* underline text */
unsigned int inverse : 1; /* inverse fg/bg */
unsigned int protect : 1; /* protect from erase */
unsigned int blink : 1; /* blink text */
unsigned int hidden : 1; /* hidden */
};
/*
* Cells * Cells
* The term_cell structure respresents a single cell in a terminal page. It * The term_cell structure respresents a single cell in a terminal page. It
* contains the stored character, the age of the cell and all its attribute s. * contains the stored character, the age of the cell and all its attribute s.
*/ */
struct term_cell { struct term_cell {
term_char_t ch; /* stored char or TERM_CHAR_NULL */ term_char_t ch; /* stored char or TERM_CHAR_NULL */
term_age_t age; /* cell age or TERM_AGE_NULL */ term_age_t age; /* cell age or TERM_AGE_NULL */
term_attr attr; /* cell attributes */ term_attr attr; /* cell attributes */
unsigned int cwidth; /* cached term_char_lookup_width(cell->ch) */ unsigned int cwidth; /* cached term_char_lookup_width(cell->ch) */
skipping to change at line 347 skipping to change at line 262
#define _term_history_free_ _cleanup_(term_history_freep) #define _term_history_free_ _cleanup_(term_history_freep)
DEFINE_TRIVIAL_CLEANUP_FUNC(term_history*, term_history_free); DEFINE_TRIVIAL_CLEANUP_FUNC(term_history*, term_history_free);
void term_history_clear(term_history *history); void term_history_clear(term_history *history);
void term_history_trim(term_history *history, unsigned int max); void term_history_trim(term_history *history, unsigned int max);
void term_history_push(term_history *history, term_line *line); void term_history_push(term_history *history, term_line *line);
term_line *term_history_pop(term_history *history, unsigned int reserve_wid th, const term_attr *attr, term_age_t age); term_line *term_history_pop(term_history *history, unsigned int reserve_wid th, const term_attr *attr, term_age_t age);
unsigned int term_history_peek(term_history *history, unsigned int max, uns igned int reserve_width, const term_attr *attr, term_age_t age); unsigned int term_history_peek(term_history *history, unsigned int max, uns igned int reserve_width, const term_attr *attr, term_age_t age);
/* /*
* UTF-8
* The UTF-decoder and encoder are adjusted for terminals and provide prope
r
* fallbacks for invalid UTF-8. In terminals it's quite usual to use fallba
cks
* instead of rejecting invalid input. This way, old legacy applications st
ill
* work (this is especially important for 7bit/ASCII DEC modes).
*/
struct term_utf8 {
uint32_t chars[5];
uint32_t ucs4;
unsigned int i_bytes : 3;
unsigned int n_bytes : 3;
unsigned int valid : 1;
};
size_t term_utf8_encode(char *out_utf8, uint32_t g);
const uint32_t *term_utf8_decode(term_utf8 *p, size_t *out_len, char c);
/*
* Parsers * Parsers
* The term_parser object parses control-sequences for both host and termin al * The term_parser object parses control-sequences for both host and termin al
* side. Based on this parser, there is a set of command-parsers that take a * side. Based on this parser, there is a set of command-parsers that take a
* term_seq sequence and returns the command it represents. This is differe nt * term_seq sequence and returns the command it represents. This is differe nt
* for host and terminal side so a different set of parsers is provided. * for host and terminal side so a different set of parsers is provided.
*/ */
enum { enum {
TERM_SEQ_NONE, /* placeholder, no sequence parsed */ TERM_SEQ_NONE, /* placeholder, no sequence parsed */
skipping to change at line 683 skipping to change at line 578
}; };
struct term_parser { struct term_parser {
term_seq seq; term_seq seq;
size_t st_alloc; size_t st_alloc;
unsigned int state; unsigned int state;
bool is_host : 1; bool is_host : 1;
}; };
int term_parser_new(term_parser **out, bool host);
term_parser *term_parser_free(term_parser *parser);
int term_parser_feed(term_parser *parser, const term_seq **seq_out, uint32_
t raw);
#define _term_parser_free_ _cleanup_(term_parser_freep)
DEFINE_TRIVIAL_CLEANUP_FUNC(term_parser*, term_parser_free);
/* /*
* Screens * Screens
* A term_screen object represents the terminal-side of the communication. It * A term_screen object represents the terminal-side of the communication. It
* connects the term-parser and term-pages and handles all required command s. * connects the term-parser and term-pages and handles all required command s.
* All state is managed by it. * All state is managed by it.
*/ */
enum { enum {
TERM_FLAG_7BIT_MODE = (1U << 0), /* 7bit mod e (default: off) */ TERM_FLAG_7BIT_MODE = (1U << 0), /* 7bit mod e (default: on) */
TERM_FLAG_HIDE_CURSOR = (1U << 1), /* hide cur sor caret (default: off) */ TERM_FLAG_HIDE_CURSOR = (1U << 1), /* hide cur sor caret (default: off) */
TERM_FLAG_INHIBIT_TPARM = (1U << 2), /* do not s end TPARM unrequested (default: off) */ TERM_FLAG_INHIBIT_TPARM = (1U << 2), /* do not s end TPARM unrequested (default: off) */
TERM_FLAG_NEWLINE_MODE = (1U << 3), /* perform carriage-return on line-feeds (default: off) */ TERM_FLAG_NEWLINE_MODE = (1U << 3), /* perform carriage-return on line-feeds (default: off) */
TERM_FLAG_ORIGIN_MODE = (1U << 4), /* in origi TERM_FLAG_PENDING_WRAP = (1U << 4), /* wrap-aro
n mode, the cursor is bound by the margins (default: off) */ und is pending */
TERM_FLAG_PENDING_WRAP = (1U << 5), /* wrap-aro TERM_FLAG_KEYPAD_MODE = (1U << 5), /* applicat
und is pending */ ion-keypad mode (default: off) */
TERM_FLAG_AUTO_WRAP = (1U << 6), /* auto-wra TERM_FLAG_CURSOR_KEYS = (1U << 6), /* enable a
p mode causes line-wraps at line-ends (default: off) */ pplication cursor-keys (default: off) */
TERM_FLAG_KEYPAD_MODE = (1U << 7), /* applicat
ion-keypad mode (default: off) */
TERM_FLAG_CURSOR_KEYS = (1U << 8), /* enable a
pplication cursor-keys (default: off) */
}; };
enum { enum {
TERM_CONFORMANCE_LEVEL_VT52, TERM_CONFORMANCE_LEVEL_VT52,
TERM_CONFORMANCE_LEVEL_VT100, TERM_CONFORMANCE_LEVEL_VT100,
TERM_CONFORMANCE_LEVEL_VT400, TERM_CONFORMANCE_LEVEL_VT400,
TERM_CONFORMANCE_LEVEL_CNT, TERM_CONFORMANCE_LEVEL_CNT,
}; };
typedef int (*term_screen_write_fn) (term_screen *screen, void *userdata, c struct term_state {
onst void *buf, size_t size); unsigned int cursor_x;
typedef int (*term_screen_cmd_fn) (term_screen *screen, void *userdata, uns unsigned int cursor_y;
igned int cmd, const term_seq *seq); term_attr attr;
term_charset **gl;
term_charset **gr;
term_charset **glt;
term_charset **grt;
bool auto_wrap : 1;
bool origin_mode : 1;
};
struct term_screen { struct term_screen {
unsigned long ref; unsigned long ref;
term_age_t age; term_age_t age;
term_page *page; term_page *page;
term_page *page_main; term_page *page_main;
term_page *page_alt; term_page *page_alt;
term_history *history; term_history *history;
term_history *history_main; term_history *history_main;
skipping to change at line 742 skipping to change at line 638
term_utf8 utf8; term_utf8 utf8;
term_parser *parser; term_parser *parser;
term_screen_write_fn write_fn; term_screen_write_fn write_fn;
void *write_fn_data; void *write_fn_data;
term_screen_cmd_fn cmd_fn; term_screen_cmd_fn cmd_fn;
void *cmd_fn_data; void *cmd_fn_data;
unsigned int flags; unsigned int flags;
unsigned int conformance_level; unsigned int conformance_level;
unsigned int cursor_x;
unsigned int cursor_y;
term_attr attr;
term_attr default_attr; term_attr default_attr;
term_charset **gl;
term_charset **gr;
term_charset **glt;
term_charset **grt;
term_charset *g0; term_charset *g0;
term_charset *g1; term_charset *g1;
term_charset *g2; term_charset *g2;
term_charset *g3; term_charset *g3;
char *answerback; char *answerback;
struct { term_state state;
unsigned int cursor_x; term_state saved;
unsigned int cursor_y; term_state saved_alt;
term_attr attr; };
term_charset **gl;
term_charset **gr;
term_charset **glt;
term_charset **grt;
unsigned int flags;
} saved;
};
int term_screen_new(term_screen **out, term_screen_write_fn write_fn, void
*write_fn_data, term_screen_cmd_fn cmd_fn, void *cmd_fn_data);
term_screen *term_screen_ref(term_screen *screen);
term_screen *term_screen_unref(term_screen *screen);
DEFINE_TRIVIAL_CLEANUP_FUNC(term_screen*, term_screen_unref);
int term_screen_feed_text(term_screen *screen, const uint8_t *in, size_t si
ze);
int term_screen_feed_keyboard(term_screen *screen, uint32_t keysym, uint32_
t ascii, uint32_t ucs4, unsigned int mods);
int term_screen_resize(term_screen *screen, unsigned int width, unsigned in
t height);
void term_screen_soft_reset(term_screen *screen);
void term_screen_hard_reset(term_screen *screen);
int term_screen_set_answerback(term_screen *screen, const char *answerback)
;
 End of changes. 14 change blocks. 
156 lines changed or deleted 21 lines changed or added


 test-tables.h   test-tables.h 
skipping to change at line 43 skipping to change at line 43
for (i = -1; i < size + 1; i++) { for (i = -1; i < size + 1; i++) {
const char* val = lookup(i); const char* val = lookup(i);
int rev; int rev;
if (val) if (val)
rev = reverse(val); rev = reverse(val);
else else
rev = reverse("--no-such--value----"); rev = reverse("--no-such--value----");
printf("%s: %d → %s → %d\n", name, i, val, rev); printf("%s: %d → %s → %d\n", name, i, val, rev);
if (i >= 0 && i < size ? assert_se(!(i >= 0 && i < size ?
sparse ? rev != i && rev != -1 : val == NULL || rev != sparse ? rev != i && rev != -1 : val == NULL ||
i : rev != i :
val != NULL || rev != -1) val != NULL || rev != -1));
exit(EXIT_FAILURE);
} }
} }
#define test_table(lower, upper) \ #define test_table(lower, upper) \
_test_table(STRINGIFY(lower), lower##_to_string, lower##_from_strin g, _##upper##_MAX, false) _test_table(STRINGIFY(lower), lower##_to_string, lower##_from_strin g, _##upper##_MAX, false)
#define test_table_sparse(lower, upper) \ #define test_table_sparse(lower, upper) \
_test_table(STRINGIFY(lower), lower##_to_string, lower##_from_strin g, _##upper##_MAX, true) _test_table(STRINGIFY(lower), lower##_to_string, lower##_from_strin g, _##upper##_MAX, true)
 End of changes. 1 change blocks. 
5 lines changed or deleted 4 lines changed or added


 time-util.h   time-util.h 
skipping to change at line 68 skipping to change at line 68
#define USEC_PER_MONTH ((usec_t) (2629800ULL*USEC_PER_SEC)) #define USEC_PER_MONTH ((usec_t) (2629800ULL*USEC_PER_SEC))
#define NSEC_PER_MONTH ((nsec_t) (2629800ULL*NSEC_PER_SEC)) #define NSEC_PER_MONTH ((nsec_t) (2629800ULL*NSEC_PER_SEC))
#define USEC_PER_YEAR ((usec_t) (31557600ULL*USEC_PER_SEC)) #define USEC_PER_YEAR ((usec_t) (31557600ULL*USEC_PER_SEC))
#define NSEC_PER_YEAR ((nsec_t) (31557600ULL*NSEC_PER_SEC)) #define NSEC_PER_YEAR ((nsec_t) (31557600ULL*NSEC_PER_SEC))
#define FORMAT_TIMESTAMP_MAX ((4*4+1)+11+9+4+1) /* weekdays can be unicode */ #define FORMAT_TIMESTAMP_MAX ((4*4+1)+11+9+4+1) /* weekdays can be unicode */
#define FORMAT_TIMESTAMP_WIDTH 28 /* when outputting, assume this width */ #define FORMAT_TIMESTAMP_WIDTH 28 /* when outputting, assume this width */
#define FORMAT_TIMESTAMP_RELATIVE_MAX 256 #define FORMAT_TIMESTAMP_RELATIVE_MAX 256
#define FORMAT_TIMESPAN_MAX 64 #define FORMAT_TIMESPAN_MAX 64
#define TIME_T_MAX (time_t)((1UL << ((sizeof(time_t) << 3) - 1)) - 1)
#define DUAL_TIMESTAMP_NULL ((struct dual_timestamp) { 0, 0 }) #define DUAL_TIMESTAMP_NULL ((struct dual_timestamp) { 0, 0 })
usec_t now(clockid_t clock); usec_t now(clockid_t clock);
dual_timestamp* dual_timestamp_get(dual_timestamp *ts); dual_timestamp* dual_timestamp_get(dual_timestamp *ts);
dual_timestamp* dual_timestamp_from_realtime(dual_timestamp *ts, usec_t u); dual_timestamp* dual_timestamp_from_realtime(dual_timestamp *ts, usec_t u);
dual_timestamp* dual_timestamp_from_monotonic(dual_timestamp *ts, usec_t u) ; dual_timestamp* dual_timestamp_from_monotonic(dual_timestamp *ts, usec_t u) ;
static inline bool dual_timestamp_is_set(dual_timestamp *ts) { static inline bool dual_timestamp_is_set(dual_timestamp *ts) {
return ((ts->realtime > 0 && ts->realtime != USEC_INFINITY) || return ((ts->realtime > 0 && ts->realtime != USEC_INFINITY) ||
(ts->monotonic > 0 && ts->monotonic != USEC_INFINITY)); (ts->monotonic > 0 && ts->monotonic != USEC_INFINITY));
} }
usec_t timespec_load(const struct timespec *ts) _pure_; usec_t timespec_load(const struct timespec *ts) _pure_;
struct timespec *timespec_store(struct timespec *ts, usec_t u); struct timespec *timespec_store(struct timespec *ts, usec_t u);
usec_t timeval_load(const struct timeval *tv) _pure_; usec_t timeval_load(const struct timeval *tv) _pure_;
struct timeval *timeval_store(struct timeval *tv, usec_t u); struct timeval *timeval_store(struct timeval *tv, usec_t u);
char *format_timestamp(char *buf, size_t l, usec_t t); char *format_timestamp(char *buf, size_t l, usec_t t);
char *format_timestamp_utc(char *buf, size_t l, usec_t t);
char *format_timestamp_us(char *buf, size_t l, usec_t t); char *format_timestamp_us(char *buf, size_t l, usec_t t);
char *format_timestamp_us_utc(char *buf, size_t l, usec_t t);
char *format_timestamp_relative(char *buf, size_t l, usec_t t); char *format_timestamp_relative(char *buf, size_t l, usec_t t);
char *format_timespan(char *buf, size_t l, usec_t t, usec_t accuracy); char *format_timespan(char *buf, size_t l, usec_t t, usec_t accuracy);
void dual_timestamp_serialize(FILE *f, const char *name, dual_timestamp *t) ; void dual_timestamp_serialize(FILE *f, const char *name, dual_timestamp *t) ;
void dual_timestamp_deserialize(const char *value, dual_timestamp *t); void dual_timestamp_deserialize(const char *value, dual_timestamp *t);
int parse_timestamp(const char *t, usec_t *usec); int parse_timestamp(const char *t, usec_t *usec);
int parse_sec(const char *t, usec_t *usec); int parse_sec(const char *t, usec_t *usec);
int parse_nsec(const char *t, nsec_t *nsec); int parse_nsec(const char *t, nsec_t *nsec);
 End of changes. 3 change blocks. 
0 lines changed or deleted 4 lines changed or added


 timesyncd-manager.h   timesyncd-manager.h 
skipping to change at line 44 skipping to change at line 44
struct Manager { struct Manager {
sd_event *event; sd_event *event;
sd_resolve *resolve; sd_resolve *resolve;
LIST_HEAD(ServerName, system_servers); LIST_HEAD(ServerName, system_servers);
LIST_HEAD(ServerName, link_servers); LIST_HEAD(ServerName, link_servers);
LIST_HEAD(ServerName, fallback_servers); LIST_HEAD(ServerName, fallback_servers);
RateLimit ratelimit; RateLimit ratelimit;
bool exhausted_servers;
/* network */ /* network */
sd_event_source *network_event_source; sd_event_source *network_event_source;
sd_network_monitor *network_monitor; sd_network_monitor *network_monitor;
/* peer */ /* peer */
sd_resolve_query *resolve_query; sd_resolve_query *resolve_query;
sd_event_source *event_receive; sd_event_source *event_receive;
ServerName *current_server_name; ServerName *current_server_name;
ServerAddress *current_server_address; ServerAddress *current_server_address;
int server_socket; int server_socket;
int missed_replies;
uint64_t packet_count; uint64_t packet_count;
sd_event_source *event_timeout; sd_event_source *event_timeout;
/* last sent packet */ /* last sent packet */
struct timespec trans_time_mon; struct timespec trans_time_mon;
struct timespec trans_time; struct timespec trans_time;
usec_t retry_interval; usec_t retry_interval;
bool pending; bool pending;
/* poll timer */ /* poll timer */
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added


 udev.h   udev.h 
skipping to change at line 26 skipping to change at line 26
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once #pragma once
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h> #include <sys/param.h>
#include <signal.h> #include <signal.h>
#include "macro.h" #include "macro.h"
#include "sd-rtnl.h"
#include "libudev.h" #include "libudev.h"
#include "libudev-private.h" #include "libudev-private.h"
#include "util.h" #include "util.h"
#include "label.h" #include "label.h"
#include "strv.h" #include "strv.h"
struct udev_event { struct udev_event {
struct udev *udev; struct udev *udev;
struct udev_device *dev; struct udev_device *dev;
struct udev_device *dev_parent; struct udev_device *dev_parent;
skipping to change at line 47 skipping to change at line 48
char *name; char *name;
char *program_result; char *program_result;
mode_t mode; mode_t mode;
uid_t uid; uid_t uid;
gid_t gid; gid_t gid;
struct udev_list seclabel_list; struct udev_list seclabel_list;
struct udev_list run_list; struct udev_list run_list;
int exec_delay; int exec_delay;
usec_t birth_usec; usec_t birth_usec;
int fd_signal; int fd_signal;
sd_rtnl *rtnl;
unsigned int builtin_run; unsigned int builtin_run;
unsigned int builtin_ret; unsigned int builtin_ret;
bool sigterm; bool sigterm;
bool inotify_watch; bool inotify_watch;
bool inotify_watch_final; bool inotify_watch_final;
bool group_set; bool group_set;
bool group_final; bool group_final;
bool owner_set; bool owner_set;
bool owner_final; bool owner_final;
bool mode_set; bool mode_set;
skipping to change at line 74 skipping to change at line 76
struct udev_list_node node; struct udev_list_node node;
int handle; int handle;
char *name; char *name;
}; };
/* udev-rules.c */ /* udev-rules.c */
struct udev_rules; struct udev_rules;
struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names); struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names);
struct udev_rules *udev_rules_unref(struct udev_rules *rules); struct udev_rules *udev_rules_unref(struct udev_rules *rules);
bool udev_rules_check_timestamp(struct udev_rules *rules); bool udev_rules_check_timestamp(struct udev_rules *rules);
int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event * int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *
event, usec_t timeout_usec, const sigset_t *sigmask); event, usec_t timeout_usec, usec_t timeout_warn_usec,
const sigset_t *sigmask);
int udev_rules_apply_static_dev_perms(struct udev_rules *rules); int udev_rules_apply_static_dev_perms(struct udev_rules *rules);
/* udev-event.c */ /* udev-event.c */
struct udev_event *udev_event_new(struct udev_device *dev); struct udev_event *udev_event_new(struct udev_device *dev);
void udev_event_unref(struct udev_event *event); void udev_event_unref(struct udev_event *event);
size_t udev_event_apply_format(struct udev_event *event, const char *src, c har *dest, size_t size); size_t udev_event_apply_format(struct udev_event *event, const char *src, c har *dest, size_t size);
int udev_event_apply_subsys_kernel(struct udev_event *event, const char *st ring, int udev_event_apply_subsys_kernel(struct udev_event *event, const char *st ring,
char *result, size_t maxsize, int read_v alue); char *result, size_t maxsize, int read_v alue);
int udev_event_spawn(struct udev_event *event, int udev_event_spawn(struct udev_event *event,
usec_t timeout_usec, usec_t timeout_usec,
usec_t timeout_warn_usec,
const char *cmd, char **envp, const sigset_t *sigmask, const char *cmd, char **envp, const sigset_t *sigmask,
char *result, size_t ressize); char *result, size_t ressize);
void udev_event_execute_rules(struct udev_event *event, usec_t timeout_usec void udev_event_execute_rules(struct udev_event *event, usec_t timeout_usec
, struct udev_rules *rules, const sigset_t *sigset); , usec_t timeout_warn_usec,
void udev_event_execute_run(struct udev_event *event, usec_t timeout_usec, struct udev_rules *rules, const sigset_t *sig
const sigset_t *sigset); set);
void udev_event_execute_run(struct udev_event *event, usec_t timeout_usec,
usec_t timeout_warn_usec, const sigset_t *sigset);
int udev_build_argv(struct udev *udev, char *cmd, int *argc, char *argv[]); int udev_build_argv(struct udev *udev, char *cmd, int *argc, char *argv[]);
/* udev-watch.c */ /* udev-watch.c */
int udev_watch_init(struct udev *udev); int udev_watch_init(struct udev *udev);
void udev_watch_restore(struct udev *udev); void udev_watch_restore(struct udev *udev);
void udev_watch_begin(struct udev *udev, struct udev_device *dev); void udev_watch_begin(struct udev *udev, struct udev_device *dev);
void udev_watch_end(struct udev *udev, struct udev_device *dev); void udev_watch_end(struct udev *udev, struct udev_device *dev);
struct udev_device *udev_watch_lookup(struct udev *udev, int wd); struct udev_device *udev_watch_lookup(struct udev *udev, int wd);
/* udev-node.c */ /* udev-node.c */
skipping to change at line 144 skipping to change at line 149
int udev_ctrl_get_exit(struct udev_ctrl_msg *ctrl_msg); int udev_ctrl_get_exit(struct udev_ctrl_msg *ctrl_msg);
const char *udev_ctrl_get_set_env(struct udev_ctrl_msg *ctrl_msg); const char *udev_ctrl_get_set_env(struct udev_ctrl_msg *ctrl_msg);
int udev_ctrl_get_set_children_max(struct udev_ctrl_msg *ctrl_msg); int udev_ctrl_get_set_children_max(struct udev_ctrl_msg *ctrl_msg);
/* built-in commands */ /* built-in commands */
enum udev_builtin_cmd { enum udev_builtin_cmd {
#ifdef HAVE_BLKID #ifdef HAVE_BLKID
UDEV_BUILTIN_BLKID, UDEV_BUILTIN_BLKID,
#endif #endif
UDEV_BUILTIN_BTRFS, UDEV_BUILTIN_BTRFS,
#ifdef HAVE_FIRMWARE
UDEV_BUILTIN_FIRMWARE,
#endif
UDEV_BUILTIN_HWDB, UDEV_BUILTIN_HWDB,
UDEV_BUILTIN_INPUT_ID, UDEV_BUILTIN_INPUT_ID,
UDEV_BUILTIN_KEYBOARD, UDEV_BUILTIN_KEYBOARD,
#ifdef HAVE_KMOD #ifdef HAVE_KMOD
UDEV_BUILTIN_KMOD, UDEV_BUILTIN_KMOD,
#endif #endif
UDEV_BUILTIN_NET_ID, UDEV_BUILTIN_NET_ID,
UDEV_BUILTIN_NET_LINK, UDEV_BUILTIN_NET_LINK,
UDEV_BUILTIN_PATH_ID, UDEV_BUILTIN_PATH_ID,
UDEV_BUILTIN_USB_ID, UDEV_BUILTIN_USB_ID,
skipping to change at line 175 skipping to change at line 177
const char *help; const char *help;
int (*init)(struct udev *udev); int (*init)(struct udev *udev);
void (*exit)(struct udev *udev); void (*exit)(struct udev *udev);
bool (*validate)(struct udev *udev); bool (*validate)(struct udev *udev);
bool run_once; bool run_once;
}; };
#ifdef HAVE_BLKID #ifdef HAVE_BLKID
extern const struct udev_builtin udev_builtin_blkid; extern const struct udev_builtin udev_builtin_blkid;
#endif #endif
extern const struct udev_builtin udev_builtin_btrfs; extern const struct udev_builtin udev_builtin_btrfs;
#ifdef HAVE_FIRMWARE
extern const struct udev_builtin udev_builtin_firmware;
#endif
extern const struct udev_builtin udev_builtin_hwdb; extern const struct udev_builtin udev_builtin_hwdb;
extern const struct udev_builtin udev_builtin_input_id; extern const struct udev_builtin udev_builtin_input_id;
extern const struct udev_builtin udev_builtin_keyboard; extern const struct udev_builtin udev_builtin_keyboard;
#ifdef HAVE_KMOD #ifdef HAVE_KMOD
extern const struct udev_builtin udev_builtin_kmod; extern const struct udev_builtin udev_builtin_kmod;
#endif #endif
extern const struct udev_builtin udev_builtin_net_id; extern const struct udev_builtin udev_builtin_net_id;
extern const struct udev_builtin udev_builtin_net_setup_link; extern const struct udev_builtin udev_builtin_net_setup_link;
extern const struct udev_builtin udev_builtin_path_id; extern const struct udev_builtin udev_builtin_path_id;
extern const struct udev_builtin udev_builtin_usb_id; extern const struct udev_builtin udev_builtin_usb_id;
 End of changes. 7 change blocks. 
12 lines changed or deleted 12 lines changed or added


 unit-name.h   unit-name.h 
skipping to change at line 32 skipping to change at line 32
***/ ***/
#include <stdbool.h> #include <stdbool.h>
#include "macro.h" #include "macro.h"
#define UNIT_NAME_MAX 256 #define UNIT_NAME_MAX 256
typedef enum UnitType UnitType; typedef enum UnitType UnitType;
typedef enum UnitLoadState UnitLoadState; typedef enum UnitLoadState UnitLoadState;
typedef enum UnitDependency UnitDependency;
enum UnitType { enum UnitType {
UNIT_SERVICE = 0, UNIT_SERVICE = 0,
UNIT_SOCKET, UNIT_SOCKET,
UNIT_BUSNAME, UNIT_BUSNAME,
UNIT_TARGET, UNIT_TARGET,
UNIT_SNAPSHOT, UNIT_SNAPSHOT,
UNIT_DEVICE, UNIT_DEVICE,
UNIT_MOUNT, UNIT_MOUNT,
UNIT_AUTOMOUNT, UNIT_AUTOMOUNT,
skipping to change at line 62 skipping to change at line 63
UNIT_STUB = 0, UNIT_STUB = 0,
UNIT_LOADED, UNIT_LOADED,
UNIT_NOT_FOUND, UNIT_NOT_FOUND,
UNIT_ERROR, UNIT_ERROR,
UNIT_MERGED, UNIT_MERGED,
UNIT_MASKED, UNIT_MASKED,
_UNIT_LOAD_STATE_MAX, _UNIT_LOAD_STATE_MAX,
_UNIT_LOAD_STATE_INVALID = -1 _UNIT_LOAD_STATE_INVALID = -1
}; };
enum UnitDependency {
/* Positive dependencies */
UNIT_REQUIRES,
UNIT_REQUIRES_OVERRIDABLE,
UNIT_REQUISITE,
UNIT_REQUISITE_OVERRIDABLE,
UNIT_WANTS,
UNIT_BINDS_TO,
UNIT_PART_OF,
/* Inverse of the above */
UNIT_REQUIRED_BY, /* inverse of 'requires' and 'requisi
te' is 'required_by' */
UNIT_REQUIRED_BY_OVERRIDABLE, /* inverse of 'requires_overridable'
and 'requisite_overridable' is 'soft_required_by' */
UNIT_WANTED_BY, /* inverse of 'wants' */
UNIT_BOUND_BY, /* inverse of 'binds_to' */
UNIT_CONSISTS_OF, /* inverse of 'part_of' */
/* Negative dependencies */
UNIT_CONFLICTS, /* inverse of 'conflicts' is 'conflic
ted_by' */
UNIT_CONFLICTED_BY,
/* Order */
UNIT_BEFORE, /* inverse of 'before' is 'after' and
vice versa */
UNIT_AFTER,
/* On Failure */
UNIT_ON_FAILURE,
/* Triggers (i.e. a socket triggers a service) */
UNIT_TRIGGERS,
UNIT_TRIGGERED_BY,
/* Propagate reloads */
UNIT_PROPAGATES_RELOAD_TO,
UNIT_RELOAD_PROPAGATED_FROM,
/* Joins namespace of */
UNIT_JOINS_NAMESPACE_OF,
/* Reference information for GC logic */
UNIT_REFERENCES, /* Inverse of 'references' is 'refere
nced_by' */
UNIT_REFERENCED_BY,
_UNIT_DEPENDENCY_MAX,
_UNIT_DEPENDENCY_INVALID = -1
};
const char *unit_type_to_string(UnitType i) _const_; const char *unit_type_to_string(UnitType i) _const_;
UnitType unit_type_from_string(const char *s) _pure_; UnitType unit_type_from_string(const char *s) _pure_;
const char *unit_load_state_to_string(UnitLoadState i) _const_; const char *unit_load_state_to_string(UnitLoadState i) _const_;
UnitLoadState unit_load_state_from_string(const char *s) _pure_; UnitLoadState unit_load_state_from_string(const char *s) _pure_;
int unit_name_to_instance(const char *n, char **instance); int unit_name_to_instance(const char *n, char **instance);
char* unit_name_to_prefix(const char *n); char* unit_name_to_prefix(const char *n);
char* unit_name_to_prefix_and_instance(const char *n); char* unit_name_to_prefix_and_instance(const char *n);
skipping to change at line 115 skipping to change at line 163
enum unit_name_mangle { enum unit_name_mangle {
MANGLE_NOGLOB, MANGLE_NOGLOB,
MANGLE_GLOB, MANGLE_GLOB,
}; };
char *unit_name_mangle(const char *name, enum unit_name_mangle allow_globs) ; char *unit_name_mangle(const char *name, enum unit_name_mangle allow_globs) ;
char *unit_name_mangle_with_suffix(const char *name, enum unit_name_mangle allow_globs, const char *suffix); char *unit_name_mangle_with_suffix(const char *name, enum unit_name_mangle allow_globs, const char *suffix);
int build_subslice(const char *slice, const char*name, char **subslice); int build_subslice(const char *slice, const char*name, char **subslice);
const char *unit_dependency_to_string(UnitDependency i) _const_;
UnitDependency unit_dependency_from_string(const char *s) _pure_;
 End of changes. 3 change blocks. 
0 lines changed or deleted 53 lines changed or added


 unit.h   unit.h 
skipping to change at line 31 skipping to change at line 31
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#include <stdbool.h> #include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
typedef struct Unit Unit; typedef struct Unit Unit;
typedef struct UnitVTable UnitVTable; typedef struct UnitVTable UnitVTable;
typedef enum UnitActiveState UnitActiveState; typedef enum UnitActiveState UnitActiveState;
typedef enum UnitDependency UnitDependency;
typedef struct UnitRef UnitRef; typedef struct UnitRef UnitRef;
typedef struct UnitStatusMessageFormats UnitStatusMessageFormats; typedef struct UnitStatusMessageFormats UnitStatusMessageFormats;
#include "sd-event.h" #include "sd-event.h"
#include "set.h" #include "set.h"
#include "util.h" #include "util.h"
#include "list.h" #include "list.h"
#include "socket-util.h" #include "socket-util.h"
#include "execute.h" #include "execute.h"
#include "cgroup.h" #include "cgroup.h"
#include "condition.h" #include "condition.h"
#include "install.h" #include "install.h"
#include "unit-name.h" #include "unit-name.h"
#include "failure-action.h"
enum UnitActiveState { enum UnitActiveState {
UNIT_ACTIVE, UNIT_ACTIVE,
UNIT_RELOADING, UNIT_RELOADING,
UNIT_INACTIVE, UNIT_INACTIVE,
UNIT_FAILED, UNIT_FAILED,
UNIT_ACTIVATING, UNIT_ACTIVATING,
UNIT_DEACTIVATING, UNIT_DEACTIVATING,
_UNIT_ACTIVE_STATE_MAX, _UNIT_ACTIVE_STATE_MAX,
_UNIT_ACTIVE_STATE_INVALID = -1 _UNIT_ACTIVE_STATE_INVALID = -1
}; };
typedef enum KillOperation {
KILL_TERMINATE,
KILL_KILL,
KILL_ABORT,
} KillOperation;
static inline bool UNIT_IS_ACTIVE_OR_RELOADING(UnitActiveState t) { static inline bool UNIT_IS_ACTIVE_OR_RELOADING(UnitActiveState t) {
return t == UNIT_ACTIVE || t == UNIT_RELOADING; return t == UNIT_ACTIVE || t == UNIT_RELOADING;
} }
static inline bool UNIT_IS_ACTIVE_OR_ACTIVATING(UnitActiveState t) { static inline bool UNIT_IS_ACTIVE_OR_ACTIVATING(UnitActiveState t) {
return t == UNIT_ACTIVE || t == UNIT_ACTIVATING || t == UNIT_RELOAD ING; return t == UNIT_ACTIVE || t == UNIT_ACTIVATING || t == UNIT_RELOAD ING;
} }
static inline bool UNIT_IS_INACTIVE_OR_DEACTIVATING(UnitActiveState t) { static inline bool UNIT_IS_INACTIVE_OR_DEACTIVATING(UnitActiveState t) {
return t == UNIT_INACTIVE || t == UNIT_FAILED || t == UNIT_DEACTIVA TING; return t == UNIT_INACTIVE || t == UNIT_FAILED || t == UNIT_DEACTIVA TING;
} }
static inline bool UNIT_IS_INACTIVE_OR_FAILED(UnitActiveState t) { static inline bool UNIT_IS_INACTIVE_OR_FAILED(UnitActiveState t) {
return t == UNIT_INACTIVE || t == UNIT_FAILED; return t == UNIT_INACTIVE || t == UNIT_FAILED;
} }
enum UnitDependency {
/* Positive dependencies */
UNIT_REQUIRES,
UNIT_REQUIRES_OVERRIDABLE,
UNIT_REQUISITE,
UNIT_REQUISITE_OVERRIDABLE,
UNIT_WANTS,
UNIT_BINDS_TO,
UNIT_PART_OF,
/* Inverse of the above */
UNIT_REQUIRED_BY, /* inverse of 'requires' and 'requisi
te' is 'required_by' */
UNIT_REQUIRED_BY_OVERRIDABLE, /* inverse of 'requires_overridable'
and 'requisite_overridable' is 'soft_required_by' */
UNIT_WANTED_BY, /* inverse of 'wants' */
UNIT_BOUND_BY, /* inverse of 'binds_to' */
UNIT_CONSISTS_OF, /* inverse of 'part_of' */
/* Negative dependencies */
UNIT_CONFLICTS, /* inverse of 'conflicts' is 'conflic
ted_by' */
UNIT_CONFLICTED_BY,
/* Order */
UNIT_BEFORE, /* inverse of 'before' is 'after' and
vice versa */
UNIT_AFTER,
/* On Failure */
UNIT_ON_FAILURE,
/* Triggers (i.e. a socket triggers a service) */
UNIT_TRIGGERS,
UNIT_TRIGGERED_BY,
/* Propagate reloads */
UNIT_PROPAGATES_RELOAD_TO,
UNIT_RELOAD_PROPAGATED_FROM,
/* Joins namespace of */
UNIT_JOINS_NAMESPACE_OF,
/* Reference information for GC logic */
UNIT_REFERENCES, /* Inverse of 'references' is 'refere
nced_by' */
UNIT_REFERENCED_BY,
_UNIT_DEPENDENCY_MAX,
_UNIT_DEPENDENCY_INVALID = -1
};
#include "manager.h" #include "manager.h"
#include "job.h" #include "job.h"
struct UnitRef { struct UnitRef {
/* Keeps tracks of references to a unit. This is useful so /* Keeps tracks of references to a unit. This is useful so
* that we can merge two units if necessary and correct all * that we can merge two units if necessary and correct all
* references to them */ * references to them */
Unit* unit; Unit* unit;
LIST_FIELDS(UnitRef, refs); LIST_FIELDS(UnitRef, refs);
skipping to change at line 163 skipping to change at line 122
usec_t fragment_mtime; usec_t fragment_mtime;
usec_t source_mtime; usec_t source_mtime;
usec_t dropin_mtime; usec_t dropin_mtime;
/* If there is something to do with this unit, then this is the ins talled job for it */ /* If there is something to do with this unit, then this is the ins talled job for it */
Job *job; Job *job;
/* JOB_NOP jobs are special and can be installed without disturbing the real job. */ /* JOB_NOP jobs are special and can be installed without disturbing the real job. */
Job *nop_job; Job *nop_job;
/* Job timeout and action to take */
usec_t job_timeout; usec_t job_timeout;
FailureAction job_timeout_action;
char *job_timeout_reboot_arg;
/* References to this */ /* References to this */
LIST_HEAD(UnitRef, refs); LIST_HEAD(UnitRef, refs);
/* Conditions to check */ /* Conditions to check */
LIST_HEAD(Condition, conditions); LIST_HEAD(Condition, conditions);
dual_timestamp condition_timestamp; dual_timestamp condition_timestamp;
dual_timestamp inactive_exit_timestamp; dual_timestamp inactive_exit_timestamp;
dual_timestamp active_enter_timestamp; dual_timestamp active_enter_timestamp;
dual_timestamp active_exit_timestamp; dual_timestamp active_exit_timestamp;
dual_timestamp inactive_enter_timestamp; dual_timestamp inactive_enter_timestamp;
/* Counterparts in the cgroup filesystem */
char *cgroup_path;
CGroupControllerMask cgroup_realized_mask;
CGroupControllerMask cgroup_subtree_mask;
CGroupControllerMask cgroup_members_mask;
UnitRef slice; UnitRef slice;
/* Per type list */ /* Per type list */
LIST_FIELDS(Unit, units_by_type); LIST_FIELDS(Unit, units_by_type);
/* All units which have requires_mounts_for set */ /* All units which have requires_mounts_for set */
LIST_FIELDS(Unit, has_requires_mounts_for); LIST_FIELDS(Unit, has_requires_mounts_for);
/* Load queue */ /* Load queue */
LIST_FIELDS(Unit, load_queue); LIST_FIELDS(Unit, load_queue);
skipping to change at line 227 skipping to change at line 183
* Only for deserializing from a legacy version. New style uses ful l * Only for deserializing from a legacy version. New style uses ful l
* serialized jobs. */ * serialized jobs. */
int deserialized_job; /* This is actually of type JobType */ int deserialized_job; /* This is actually of type JobType */
/* Error code when we didn't manage to load the unit (negative) */ /* Error code when we didn't manage to load the unit (negative) */
int load_error; int load_error;
/* Cached unit file state */ /* Cached unit file state */
UnitFileState unit_file_state; UnitFileState unit_file_state;
/* Counterparts in the cgroup filesystem */
char *cgroup_path;
CGroupControllerMask cgroup_realized_mask;
CGroupControllerMask cgroup_subtree_mask;
CGroupControllerMask cgroup_members_mask;
/* How to start OnFailure units */
JobMode on_failure_job_mode;
/* Garbage collect us we nobody wants or requires us anymore */ /* Garbage collect us we nobody wants or requires us anymore */
bool stop_when_unneeded; bool stop_when_unneeded;
/* Create default dependencies */ /* Create default dependencies */
bool default_dependencies; bool default_dependencies;
/* Refuse manual starting, allow starting only indirectly via depen dency. */ /* Refuse manual starting, allow starting only indirectly via depen dency. */
bool refuse_manual_start; bool refuse_manual_start;
/* Don't allow the user to stop this unit manually, allow stopping only indirectly via dependency. */ /* Don't allow the user to stop this unit manually, allow stopping only indirectly via dependency. */
bool refuse_manual_stop; bool refuse_manual_stop;
/* Allow isolation requests */ /* Allow isolation requests */
bool allow_isolate; bool allow_isolate;
/* How to start OnFailure units */
JobMode on_failure_job_mode;
/* Ignore this unit when isolating */ /* Ignore this unit when isolating */
bool ignore_on_isolate; bool ignore_on_isolate;
/* Ignore this unit when snapshotting */ /* Ignore this unit when snapshotting */
bool ignore_on_snapshot; bool ignore_on_snapshot;
/* Did the last condition check succeed? */ /* Did the last condition check succeed? */
bool condition_result; bool condition_result;
/* Is this a transient unit? */ /* Is this a transient unit? */
skipping to change at line 623 skipping to change at line 585
int unit_setup_exec_runtime(Unit *u); int unit_setup_exec_runtime(Unit *u);
int unit_write_drop_in(Unit *u, UnitSetPropertiesMode mode, const char *nam e, const char *data); int unit_write_drop_in(Unit *u, UnitSetPropertiesMode mode, const char *nam e, const char *data);
int unit_write_drop_in_format(Unit *u, UnitSetPropertiesMode mode, const ch ar *name, const char *format, ...) _printf_(4,5); int unit_write_drop_in_format(Unit *u, UnitSetPropertiesMode mode, const ch ar *name, const char *format, ...) _printf_(4,5);
int unit_write_drop_in_private(Unit *u, UnitSetPropertiesMode mode, const c har *name, const char *data); int unit_write_drop_in_private(Unit *u, UnitSetPropertiesMode mode, const c har *name, const char *data);
int unit_write_drop_in_private_format(Unit *u, UnitSetPropertiesMode mode, const char *name, const char *format, ...) _printf_(4,5); int unit_write_drop_in_private_format(Unit *u, UnitSetPropertiesMode mode, const char *name, const char *format, ...) _printf_(4,5);
int unit_remove_drop_in(Unit *u, UnitSetPropertiesMode mode, const char *na me); int unit_remove_drop_in(Unit *u, UnitSetPropertiesMode mode, const char *na me);
int unit_kill_context(Unit *u, KillContext *c, bool sigkill, pid_t main_pid , pid_t control_pid, bool main_pid_alien); int unit_kill_context(Unit *u, KillContext *c, KillOperation k, pid_t main_ pid, pid_t control_pid, bool main_pid_alien);
int unit_make_transient(Unit *u); int unit_make_transient(Unit *u);
int unit_require_mounts_for(Unit *u, const char *path); int unit_require_mounts_for(Unit *u, const char *path);
const char *unit_active_state_to_string(UnitActiveState i) _const_; const char *unit_active_state_to_string(UnitActiveState i) _const_;
UnitActiveState unit_active_state_from_string(const char *s) _pure_; UnitActiveState unit_active_state_from_string(const char *s) _pure_;
const char *unit_dependency_to_string(UnitDependency i) _const_;
UnitDependency unit_dependency_from_string(const char *s) _pure_;
/* Macros which append UNIT= or USER_UNIT= to the message */ /* Macros which append UNIT= or USER_UNIT= to the message */
#define log_full_unit(level, unit, ...) log_meta_object(level, __FILE__, __ LINE__, __func__, getpid() == 1 ? "UNIT=" : "USER_UNIT=", unit, __VA_ARGS__ ) #define log_full_unit(level, unit, ...) log_meta_object(level, __FILE__, __ LINE__, __func__, getpid() == 1 ? "UNIT=" : "USER_UNIT=", unit, __VA_ARGS__ )
#define log_debug_unit(unit, ...) log_full_unit(LOG_DEBUG, unit, __VA _ARGS__) #define log_debug_unit(unit, ...) log_full_unit(LOG_DEBUG, unit, __VA _ARGS__)
#define log_info_unit(unit, ...) log_full_unit(LOG_INFO, unit, __VA_ ARGS__) #define log_info_unit(unit, ...) log_full_unit(LOG_INFO, unit, __VA_ ARGS__)
#define log_notice_unit(unit, ...) log_full_unit(LOG_NOTICE, unit, __V A_ARGS__) #define log_notice_unit(unit, ...) log_full_unit(LOG_NOTICE, unit, __V A_ARGS__)
#define log_warning_unit(unit, ...) log_full_unit(LOG_WARNING, unit, __ VA_ARGS__) #define log_warning_unit(unit, ...) log_full_unit(LOG_WARNING, unit, __ VA_ARGS__)
#define log_error_unit(unit, ...) log_full_unit(LOG_ERR, unit, __VA_A RGS__) #define log_error_unit(unit, ...) log_full_unit(LOG_ERR, unit, __VA_A RGS__)
#define log_struct_unit(level, unit, ...) log_struct(level, getpid() == 1 ? "UNIT=%s" : "USER_UNIT=%s", unit, __VA_ARGS__) #define log_struct_unit(level, unit, ...) log_struct(level, getpid() == 1 ? "UNIT=%s" : "USER_UNIT=%s", unit, __VA_ARGS__)
 End of changes. 11 change blocks. 
66 lines changed or deleted 20 lines changed or added


 util.h   util.h 
skipping to change at line 88 skipping to change at line 88
#if SIZEOF_RLIM_T == 8 #if SIZEOF_RLIM_T == 8
# define RLIM_FMT "%" PRIu64 # define RLIM_FMT "%" PRIu64
#elif SIZEOF_RLIM_T == 4 #elif SIZEOF_RLIM_T == 4
# define RLIM_FMT "%" PRIu32 # define RLIM_FMT "%" PRIu32
#else #else
# error Unknown rlim_t size # error Unknown rlim_t size
#endif #endif
#include "macro.h" #include "macro.h"
#include "missing.h" #include "missing.h"
#include "missing.h"
#include "time-util.h" #include "time-util.h"
/* What is interpreted as whitespace? */ /* What is interpreted as whitespace? */
#define WHITESPACE " \t\n\r" #define WHITESPACE " \t\n\r"
#define NEWLINE "\n\r" #define NEWLINE "\n\r"
#define QUOTES "\"\'" #define QUOTES "\"\'"
#define COMMENTS "#;" #define COMMENTS "#;"
#define GLOB_CHARS "*?[" #define GLOB_CHARS "*?["
/* What characters are special in the shell? */ /* What characters are special in the shell? */
skipping to change at line 161 skipping to change at line 162
} }
static inline const char *strna(const char *s) { static inline const char *strna(const char *s) {
return s ? s : "n/a"; return s ? s : "n/a";
} }
static inline bool isempty(const char *p) { static inline bool isempty(const char *p) {
return !p || !p[0]; return !p || !p[0];
} }
static inline const char *startswith(const char *s, const char *prefix) { static inline char *startswith(const char *s, const char *prefix) {
if (strncmp(s, prefix, strlen(prefix)) == 0) size_t l;
return s + strlen(prefix);
l = strlen(prefix);
if (strncmp(s, prefix, l) == 0)
return (char*) s + l;
return NULL; return NULL;
} }
static inline const char *startswith_no_case(const char *s, const char *pre static inline char *startswith_no_case(const char *s, const char *prefix) {
fix) { size_t l;
if (strncasecmp(s, prefix, strlen(prefix)) == 0)
return s + strlen(prefix); l = strlen(prefix);
if (strncasecmp(s, prefix, l) == 0)
return (char*) s + l;
return NULL; return NULL;
} }
char *endswith(const char *s, const char *postfix) _pure_; char *endswith(const char *s, const char *postfix) _pure_;
char *first_word(const char *s, const char *word) _pure_; char *first_word(const char *s, const char *word) _pure_;
int close_nointr(int fd); int close_nointr(int fd);
int safe_close(int fd); int safe_close(int fd);
void safe_close_pair(int p[]); void safe_close_pair(int p[]);
skipping to change at line 200 skipping to change at line 209
int safe_atou(const char *s, unsigned *ret_u); int safe_atou(const char *s, unsigned *ret_u);
int safe_atoi(const char *s, int *ret_i); int safe_atoi(const char *s, int *ret_i);
int safe_atollu(const char *s, unsigned long long *ret_u); int safe_atollu(const char *s, unsigned long long *ret_u);
int safe_atolli(const char *s, long long int *ret_i); int safe_atolli(const char *s, long long int *ret_i);
int safe_atod(const char *s, double *ret_d); int safe_atod(const char *s, double *ret_d);
int safe_atou8(const char *s, uint8_t *ret); int safe_atou8(const char *s, uint8_t *ret);
#if __WORDSIZE == 32 #if LONG_MAX == INT_MAX
static inline int safe_atolu(const char *s, unsigned long *ret_u) { static inline int safe_atolu(const char *s, unsigned long *ret_u) {
assert_cc(sizeof(unsigned long) == sizeof(unsigned)); assert_cc(sizeof(unsigned long) == sizeof(unsigned));
return safe_atou(s, (unsigned*) ret_u); return safe_atou(s, (unsigned*) ret_u);
} }
static inline int safe_atoli(const char *s, long int *ret_u) { static inline int safe_atoli(const char *s, long int *ret_u) {
assert_cc(sizeof(long int) == sizeof(int)); assert_cc(sizeof(long int) == sizeof(int));
return safe_atoi(s, (int*) ret_u); return safe_atoi(s, (int*) ret_u);
} }
#else #else
static inline int safe_atolu(const char *s, unsigned long *ret_u) { static inline int safe_atolu(const char *s, unsigned long *ret_u) {
skipping to change at line 269 skipping to change at line 278
char *replace_env(const char *format, char **env); char *replace_env(const char *format, char **env);
char **replace_env_argv(char **argv, char **env); char **replace_env_argv(char **argv, char **env);
int readlinkat_malloc(int fd, const char *p, char **ret); int readlinkat_malloc(int fd, const char *p, char **ret);
int readlink_malloc(const char *p, char **r); int readlink_malloc(const char *p, char **r);
int readlink_and_make_absolute(const char *p, char **r); int readlink_and_make_absolute(const char *p, char **r);
int readlink_and_canonicalize(const char *p, char **r); int readlink_and_canonicalize(const char *p, char **r);
int reset_all_signal_handlers(void); int reset_all_signal_handlers(void);
int reset_signal_mask(void);
char *strstrip(char *s); char *strstrip(char *s);
char *delete_chars(char *s, const char *bad); char *delete_chars(char *s, const char *bad);
char *truncate_nl(char *s); char *truncate_nl(char *s);
char *file_in_same_dir(const char *path, const char *filename); char *file_in_same_dir(const char *path, const char *filename);
int rmdir_parents(const char *path, const char *stop); int rmdir_parents(const char *path, const char *stop);
int get_process_state(pid_t pid); int get_process_state(pid_t pid);
skipping to change at line 426 skipping to change at line 436
int dir_is_empty(const char *path); int dir_is_empty(const char *path);
char* dirname_malloc(const char *path); char* dirname_malloc(const char *path);
void rename_process(const char name[8]); void rename_process(const char name[8]);
void sigset_add_many(sigset_t *ss, ...); void sigset_add_many(sigset_t *ss, ...);
int sigprocmask_many(int how, ...); int sigprocmask_many(int how, ...);
bool hostname_is_set(void); bool hostname_is_set(void);
char* lookup_uid(uid_t uid);
char* gethostname_malloc(void); char* gethostname_malloc(void);
char* getlogname_malloc(void); char* getlogname_malloc(void);
char* getusername_malloc(void); char* getusername_malloc(void);
int getttyname_malloc(int fd, char **r); int getttyname_malloc(int fd, char **r);
int getttyname_harder(int fd, char **r); int getttyname_harder(int fd, char **r);
int get_ctty_devnr(pid_t pid, dev_t *d); int get_ctty_devnr(pid_t pid, dev_t *d);
int get_ctty(pid_t, dev_t *_devnr, char **r); int get_ctty(pid_t, dev_t *_devnr, char **r);
skipping to change at line 576 skipping to change at line 587
static inline bool _pure_ in_charset(const char *s, const char* charset) { static inline bool _pure_ in_charset(const char *s, const char* charset) {
assert(s); assert(s);
assert(charset); assert(charset);
return s[strspn(s, charset)] == '\0'; return s[strspn(s, charset)] == '\0';
} }
int block_get_whole_disk(dev_t d, dev_t *ret); int block_get_whole_disk(dev_t d, dev_t *ret);
int file_is_priv_sticky(const char *p); int file_is_priv_sticky(const char *p);
int strdup_or_null(const char *a, char **b);
#define NULSTR_FOREACH(i, l) \ #define NULSTR_FOREACH(i, l) \
for ((i) = (l); (i) && *(i); (i) = strchr((i), 0)+1) for ((i) = (l); (i) && *(i); (i) = strchr((i), 0)+1)
#define NULSTR_FOREACH_PAIR(i, j, l) \ #define NULSTR_FOREACH_PAIR(i, j, l) \
for ((i) = (l), (j) = strchr((i), 0)+1; (i) && *(i); (i) = strchr(( j), 0)+1, (j) = *(i) ? strchr((i), 0)+1 : (i)) for ((i) = (l), (j) = strchr((i), 0)+1; (i) && *(i); (i) = strchr(( j), 0)+1, (j) = *(i) ? strchr((i), 0)+1 : (i))
int ioprio_class_to_string_alloc(int i, char **s); int ioprio_class_to_string_alloc(int i, char **s);
int ioprio_class_from_string(const char *s); int ioprio_class_from_string(const char *s);
const char *sigchld_code_to_string(int i) _const_; const char *sigchld_code_to_string(int i) _const_;
skipping to change at line 847 skipping to change at line 856
int unlink_noerrno(const char *path); int unlink_noerrno(const char *path);
#define alloca0(n) \ #define alloca0(n) \
({ \ ({ \
char *_new_; \ char *_new_; \
size_t _len_ = n; \ size_t _len_ = n; \
_new_ = alloca(_len_); \ _new_ = alloca(_len_); \
(void *) memset(_new_, 0, _len_); \ (void *) memset(_new_, 0, _len_); \
}) })
#define alloca_align(size, align) \
({ \
void *_ptr_; \
size_t _mask_ = (align) - 1; \
_ptr_ = alloca((size) + _mask_); \
(void*)(((uintptr_t)_ptr_ + _mask_) & ~_mask_); \
})
#define alloca0_align(size, align) \
({ \
void *_new_; \
size_t _size_ = (size); \
_new_ = alloca_align(_size_, (align)); \
(void*)memset(_new_, 0, _size_); \
})
#define strappenda(a, ...) \ #define strappenda(a, ...) \
({ \ ({ \
int _len = strlen(a); \ int _len = strlen(a); \
unsigned _i; \ unsigned _i; \
char *_d_, *_p_; \ char *_d_, *_p_; \
const char *_appendees_[] = { __VA_ARGS__ }; \ const char *_appendees_[] = { __VA_ARGS__ }; \
for (_i = 0; _i < ELEMENTSOF(_appendees_); _i++) \ for (_i = 0; _i < ELEMENTSOF(_appendees_); _i++) \
_len += strlen(_appendees_[_i]); \ _len += strlen(_appendees_[_i]); \
_d_ = alloca(_len + 1); \ _d_ = alloca(_len + 1); \
_p_ = stpcpy(_d_, a); \ _p_ = stpcpy(_d_, a); \
skipping to change at line 970 skipping to change at line 995
int fflush_and_check(FILE *f); int fflush_and_check(FILE *f);
char *tempfn_xxxxxx(const char *p); char *tempfn_xxxxxx(const char *p);
char *tempfn_random(const char *p); char *tempfn_random(const char *p);
bool is_localhost(const char *hostname); bool is_localhost(const char *hostname);
int take_password_lock(const char *root); int take_password_lock(const char *root);
int is_symlink(const char *path); int is_symlink(const char *path);
int is_dir(const char *path, bool follow);
int unquote_first_word(const char **p, char **ret); int unquote_first_word(const char **p, char **ret);
int unquote_many_words(const char **p, ...) _sentinel_; int unquote_many_words(const char **p, ...) _sentinel_;
int free_and_strdup(char **p, const char *s);
int sethostname_idempotent(const char *s);
 End of changes. 10 change blocks. 
10 lines changed or deleted 35 lines changed or added


 utmp-wtmp.h   utmp-wtmp.h 
skipping to change at line 26 skipping to change at line 26
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#include "util.h" #include "util.h"
#ifdef HAVE_UTMP
int utmp_get_runlevel(int *runlevel, int *previous); int utmp_get_runlevel(int *runlevel, int *previous);
int utmp_put_shutdown(void); int utmp_put_shutdown(void);
int utmp_put_reboot(usec_t timestamp); int utmp_put_reboot(usec_t timestamp);
int utmp_put_runlevel(int runlevel, int previous); int utmp_put_runlevel(int runlevel, int previous);
int utmp_put_dead_process(const char *id, pid_t pid, int code, int status); int utmp_put_dead_process(const char *id, pid_t pid, int code, int status);
int utmp_put_init_process(const char *id, pid_t pid, pid_t sid, const char *line); int utmp_put_init_process(const char *id, pid_t pid, pid_t sid, const char *line);
int utmp_wall(const char *message, const char *username, bool (*match_tty)( const char *tty)); int utmp_wall(const char *message, const char *username, bool (*match_tty)( const char *tty));
#else /* HAVE_UTMP */
static inline int utmp_get_runlevel(int *runlevel, int *previous) {
return -ESRCH;
}
static inline int utmp_put_shutdown(void) {
return 0;
}
static inline int utmp_put_reboot(usec_t timestamp) {
return 0;
}
static inline int utmp_put_runlevel(int runlevel, int previous) {
return 0;
}
static inline int utmp_put_dead_process(const char *id, pid_t pid, int code
, int status) {
return 0;
}
static inline int utmp_put_init_process(const char *id, pid_t pid, pid_t si
d, const char *line) {
return 0;
}
static inline int utmp_wall(const char *message, const char *username,
bool (*match_tty)(const char *tty)) {
return 0;
}
#endif /* HAVE_UTMP */
 End of changes. 2 change blocks. 
0 lines changed or deleted 1 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/