architecture.h   architecture.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 <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. */ * endianess. */
typedef enum Architecture { typedef enum Architecture {
ARCHITECTURE_X86 = 0, ARCHITECTURE_X86 = 0,
ARCHITECTURE_X86_64, ARCHITECTURE_X86_64,
skipping to change at line 83 skipping to change at line 85
* Debian's paths on all distributions. * Debian's paths on all distributions.
*/ */
#if defined(__x86_64__) #if defined(__x86_64__)
# define native_architecture() ARCHITECTURE_X86_64 # define native_architecture() ARCHITECTURE_X86_64
# define LIB_ARCH_TUPLE "x86_64-linux-gnu" # define LIB_ARCH_TUPLE "x86_64-linux-gnu"
#elif defined(__i386__) #elif defined(__i386__)
# define native_architecture() ARCHITECTURE_X86 # define native_architecture() ARCHITECTURE_X86
# define LIB_ARCH_TUPLE "i386-linux-gnu" # define LIB_ARCH_TUPLE "i386-linux-gnu"
#elif defined(__powerpc64__) #elif defined(__powerpc64__)
# if defined(WORDS_BIGENDIAN) # if __BYTE_ORDER == __BIG_ENDIAN
# define native_architecture() ARCHITECTURE_PPC64 # define native_architecture() ARCHITECTURE_PPC64
# define LIB_ARCH_TUPLE "ppc64-linux-gnu" # define LIB_ARCH_TUPLE "ppc64-linux-gnu"
# else # else
# define native_architecture() ARCHITECTURE_PPC64_LE # define native_architecture() ARCHITECTURE_PPC64_LE
# error "Missing LIB_ARCH_TUPLE for PPC64LE" # define LIB_ARCH_TUPLE "powerpc64le-linux-gnu"
# endif # endif
#elif defined(__powerpc__) #elif defined(__powerpc__)
# if defined(WORDS_BIGENDIAN) # if __BYTE_ORDER == __BIG_ENDIAN
# define native_architecture() ARCHITECTURE_PPC # define native_architecture() ARCHITECTURE_PPC
# define LIB_ARCH_TUPLE "powerpc-linux-gnu" # define LIB_ARCH_TUPLE "powerpc-linux-gnu"
# else # else
# define native_architecture() ARCHITECTURE_PPC_LE # define native_architecture() ARCHITECTURE_PPC_LE
# error "Missing LIB_ARCH_TUPLE for PPCLE" # error "Missing LIB_ARCH_TUPLE for PPCLE"
# endif # endif
#elif defined(__ia64__) #elif defined(__ia64__)
# define native_architecture() ARCHITECTURE_IA64 # define native_architecture() ARCHITECTURE_IA64
# define LIB_ARCH_TUPLE "ia64-linux-gnu" # define LIB_ARCH_TUPLE "ia64-linux-gnu"
#elif defined(__hppa64__) #elif defined(__hppa64__)
skipping to change at line 120 skipping to change at line 122
#elif defined(__s390__) #elif defined(__s390__)
# define native_architecture() ARCHITECTURE_S390 # define native_architecture() ARCHITECTURE_S390
# define LIB_ARCH_TUPLE "s390-linux-gnu" # define LIB_ARCH_TUPLE "s390-linux-gnu"
#elif defined(__sparc64__) #elif defined(__sparc64__)
# define native_architecture() ARCHITECTURE_SPARC64 # define native_architecture() ARCHITECTURE_SPARC64
# define LIB_ARCH_TUPLE "sparc64-linux-gnu" # define LIB_ARCH_TUPLE "sparc64-linux-gnu"
#elif defined(__sparc__) #elif defined(__sparc__)
# define native_architecture() ARCHITECTURE_SPARC # define native_architecture() ARCHITECTURE_SPARC
# define LIB_ARCH_TUPLE "sparc-linux-gnu" # define LIB_ARCH_TUPLE "sparc-linux-gnu"
#elif defined(__mips64__) #elif defined(__mips64__)
# if defined(WORDS_BIGENDIAN) # if __BYTE_ORDER == __BIG_ENDIAN
# define native_architecture() ARCHITECTURE_MIPS64 # define native_architecture() ARCHITECTURE_MIPS64
# error "Missing LIB_ARCH_TUPLE for MIPS64" # error "Missing LIB_ARCH_TUPLE for MIPS64"
# else # else
# define native_architecture() ARCHITECTURE_MIPS64_LE # define native_architecture() ARCHITECTURE_MIPS64_LE
# error "Missing LIB_ARCH_TUPLE for MIPS64_LE" # error "Missing LIB_ARCH_TUPLE for MIPS64_LE"
# endif # endif
#elif defined(__mips__) #elif defined(__mips__)
# if defined(WORDS_BIGENDIAN) # if __BYTE_ORDER == __BIG_ENDIAN
# define native_architecture() ARCHITECTURE_MIPS # define native_architecture() ARCHITECTURE_MIPS
# define LIB_ARCH_TUPLE "mips-linux-gnu" # define LIB_ARCH_TUPLE "mips-linux-gnu"
# else # else
# define native_architecture() ARCHITECTURE_MIPS_LE # define native_architecture() ARCHITECTURE_MIPS_LE
# define LIB_ARCH_TUPLE "mipsel-linux-gnu" # define LIB_ARCH_TUPLE "mipsel-linux-gnu"
#endif #endif
#elif defined(__alpha__) #elif defined(__alpha__)
# define native_architecture() ARCHITECTURE_ALPHA # define native_architecture() ARCHITECTURE_ALPHA
# define LIB_ARCH_TUPLE "alpha-linux-gnu" # define LIB_ARCH_TUPLE "alpha-linux-gnu"
#elif defined(__aarch64__) #elif defined(__aarch64__)
# if defined(WORDS_BIGENDIAN) # if __BYTE_ORDER == __BIG_ENDIAN
# define native_architecture() ARCHITECTURE_ARM64_BE # define native_architecture() ARCHITECTURE_ARM64_BE
# define LIB_ARCH_TUPLE "aarch64_be-linux-gnu" # define LIB_ARCH_TUPLE "aarch64_be-linux-gnu"
# else # else
# define native_architecture() ARCHITECTURE_ARM64 # define native_architecture() ARCHITECTURE_ARM64
# define LIB_ARCH_TUPLE "aarch64-linux-gnu" # define LIB_ARCH_TUPLE "aarch64-linux-gnu"
# endif # endif
#elif defined(__arm__) #elif defined(__arm__)
# if defined(WORDS_BIGENDIAN) # if __BYTE_ORDER == __BIG_ENDIAN
# define native_architecture() ARCHITECTURE_ARM_BE # define native_architecture() ARCHITECTURE_ARM_BE
# if defined(__ARM_EABI__) # if defined(__ARM_EABI__)
# if defined(__ARM_PCS_VFP) # if defined(__ARM_PCS_VFP)
# define LIB_ARCH_TUPLE "armeb-linux-gnueabihf" # define LIB_ARCH_TUPLE "armeb-linux-gnueabihf"
# else # else
# define LIB_ARCH_TUPLE "armeb-linux-gnueabi" # define LIB_ARCH_TUPLE "armeb-linux-gnueabi"
# endif # endif
# else # else
# define LIB_ARCH_TUPLE "armeb-linux-gnu" # define LIB_ARCH_TUPLE "armeb-linux-gnu"
# endif # endif
 End of changes. 8 change blocks. 
7 lines changed or deleted 9 lines changed or added


 build.h   build.h 
skipping to change at line 54 skipping to change at line 54
#else #else
#define _APPARMOR_FEATURE_ "-APPARMOR" #define _APPARMOR_FEATURE_ "-APPARMOR"
#endif #endif
#ifdef HAVE_IMA #ifdef HAVE_IMA
#define _IMA_FEATURE_ "+IMA" #define _IMA_FEATURE_ "+IMA"
#else #else
#define _IMA_FEATURE_ "-IMA" #define _IMA_FEATURE_ "-IMA"
#endif #endif
#ifdef HAVE_SMACK
#define _SMACK_FEATURE_ "+SMACK"
#else
#define _SMACK_FEATURE_ "-SMACK"
#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_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"
#endif #endif
#ifdef HAVE_GNUTLS
#define _GNUTLS_FEATURE_ "+GNUTLS"
#else
#define _GNUTLS_FEATURE_ "-GNUTLS"
#endif
#ifdef HAVE_ACL #ifdef HAVE_ACL
#define _ACL_FEATURE_ "+ACL" #define _ACL_FEATURE_ "+ACL"
#else #else
#define _ACL_FEATURE_ "-ACL" #define _ACL_FEATURE_ "-ACL"
#endif #endif
#ifdef HAVE_XZ #ifdef HAVE_XZ
#define _XZ_FEATURE_ "+XZ" #define _XZ_FEATURE_ "+XZ"
#else #else
#define _XZ_FEATURE_ "-XZ" #define _XZ_FEATURE_ "-XZ"
#endif #endif
#ifdef HAVE_LZ4
#define _LZ4_FEATURE_ "+LZ4"
#else
#define _LZ4_FEATURE_ "-LZ4"
#endif
#ifdef HAVE_SECCOMP #ifdef HAVE_SECCOMP
#define _SECCOMP_FEATURE_ "+SECCOMP" #define _SECCOMP_FEATURE_ "+SECCOMP"
#else #else
#define _SECCOMP_FEATURE_ "-SECCOMP" #define _SECCOMP_FEATURE_ "-SECCOMP"
#endif #endif
#define SYSTEMD_FEATURES _PAM_FEATURE_ " " _AUDIT_FEATURE_ " " _SELINUX_FEA #ifdef HAVE_BLKID
TURE_ " " _IMA_FEATURE_ " " _SYSVINIT_FEATURE_ " " _LIBCRYPTSETUP_FEATURE_ #define _BLKID_FEATURE_ "+BLKID"
" " _GCRYPT_FEATURE_ " " _ACL_FEATURE_ " " _XZ_FEATURE_ " " _SECCOMP_FEATUR #else
E_ " " _APPARMOR_FEATURE_ #define _BLKID_FEATURE_ "-BLKID"
#endif
#ifdef HAVE_ELFUTILS
#define _ELFUTILS_FEATURE_ "+ELFUTILS"
#else
#define _ELFUTILS_FEATURE_ "-ELFUTILS"
#endif
#ifdef HAVE_KMOD
#define _KMOD_FEATURE_ "+KMOD"
#else
#define _KMOD_FEATURE_ "-KMOD"
#endif
#ifdef HAVE_KMOD
#define _KMOD_FEATURE_ "+KMOD"
#else
#define _KMOD_FEATURE_ "-KMOD"
#endif
#ifdef HAVE_LIBIDN
#define _IDN_FEATURE_ "+IDN"
#else
#define _IDN_FEATURE_ "-IDN"
#endif
#define SYSTEMD_FEATURES \
_PAM_FEATURE_ " " \
_AUDIT_FEATURE_ " " \
_SELINUX_FEATURE_ " " \
_IMA_FEATURE_ " " \
_APPARMOR_FEATURE_ " " \
_SMACK_FEATURE_ " " \
_SYSVINIT_FEATURE_ " " \
_LIBCRYPTSETUP_FEATURE_ " " \
_GCRYPT_FEATURE_ " " \
_GNUTLS_FEATURE_ " " \
_ACL_FEATURE_ " " \
_XZ_FEATURE_ " " \
_LZ4_FEATURE_ " " \
_SECCOMP_FEATURE_ " " \
_BLKID_FEATURE_ " " \
_ELFUTILS_FEATURE_ " " \
_KMOD_FEATURE_ " " \
_IDN_FEATURE_ " "
 End of changes. 4 change blocks. 
0 lines changed or deleted 18 lines changed or added


 bus-errors.h   bus-errors.h 
skipping to change at line 62 skipping to change at line 62
#define BUS_ERROR_SESSION_NOT_ON_SEAT "org.freedesktop.login1.SessionNotOnS eat" #define BUS_ERROR_SESSION_NOT_ON_SEAT "org.freedesktop.login1.SessionNotOnS eat"
#define BUS_ERROR_NOT_IN_CONTROL "org.freedesktop.login1.NotInControl" #define BUS_ERROR_NOT_IN_CONTROL "org.freedesktop.login1.NotInControl"
#define BUS_ERROR_DEVICE_IS_TAKEN "org.freedesktop.login1.DeviceIsTaken" #define BUS_ERROR_DEVICE_IS_TAKEN "org.freedesktop.login1.DeviceIsTaken"
#define BUS_ERROR_DEVICE_NOT_TAKEN "org.freedesktop.login1.DeviceNotTaken" #define BUS_ERROR_DEVICE_NOT_TAKEN "org.freedesktop.login1.DeviceNotTaken"
#define BUS_ERROR_OPERATION_IN_PROGRESS "org.freedesktop.login1.OperationIn Progress" #define BUS_ERROR_OPERATION_IN_PROGRESS "org.freedesktop.login1.OperationIn Progress"
#define BUS_ERROR_SLEEP_VERB_NOT_SUPPORTED "org.freedesktop.login1.SleepVer bNotSupported" #define BUS_ERROR_SLEEP_VERB_NOT_SUPPORTED "org.freedesktop.login1.SleepVer bNotSupported"
#define BUS_ERROR_AUTOMATIC_TIME_SYNC_ENABLED "org.freedesktop.timedate1.Au tomaticTimeSyncEnabled" #define BUS_ERROR_AUTOMATIC_TIME_SYNC_ENABLED "org.freedesktop.timedate1.Au tomaticTimeSyncEnabled"
#define BUS_ERROR_NO_SUCH_PROCESS "org.freedesktop.systemd1.NoSuchProcess" #define BUS_ERROR_NO_SUCH_PROCESS "org.freedesktop.systemd1.NoSuchProcess"
#define BUS_ERROR_NO_NAME_SERVERS "org.freedesktop.resolve1.NoNameServers"
#define BUS_ERROR_INVALID_REPLY "org.freedesktop.resolve1.InvalidReply"
#define BUS_ERROR_NO_SUCH_RR "org.freedesktop.resolve1.NoSuchRR"
#define BUS_ERROR_NO_RESOURCES "org.freedesktop.resolve1.NoResources"
#define BUS_ERROR_CNAME_LOOP "org.freedesktop.resolve1.CNameLoop"
#define BUS_ERROR_ABORTED "org.freedesktop.resolve1.Aborted"
#define _BUS_ERROR_DNS "org.freedesktop.resolve1.DnsError."
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added


 bus-internal.h   bus-internal.h 
skipping to change at line 240 skipping to change at line 240
struct bus_match_node match_callbacks; struct bus_match_node match_callbacks;
Prioq *reply_callbacks_prioq; Prioq *reply_callbacks_prioq;
Hashmap *reply_callbacks; Hashmap *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 { union sockaddr_union sockaddr;
struct sockaddr sa;
struct sockaddr_un un;
struct sockaddr_in in;
struct sockaddr_in6 in6;
} sockaddr;
socklen_t sockaddr_size; socklen_t sockaddr_size;
char *kernel; char *kernel;
char *machine; char *machine;
sd_id128_t server_id; sd_id128_t server_id;
char *address; char *address;
unsigned address_index; unsigned address_index;
skipping to change at line 306 skipping to change at line 301
sd_event_source *input_io_event_source; sd_event_source *input_io_event_source;
sd_event_source *output_io_event_source; sd_event_source *output_io_event_source;
sd_event_source *time_event_source; sd_event_source *time_event_source;
sd_event_source *quit_event_source; sd_event_source *quit_event_source;
sd_event *event; sd_event *event;
int event_priority; int event_priority;
sd_bus_message *current_message; sd_bus_message *current_message;
sd_bus_slot *current_slot; sd_bus_slot *current_slot;
sd_bus_message_handler_t current_handler;
void *current_userdata;
sd_bus **default_bus_ptr; sd_bus **default_bus_ptr;
pid_t tid; pid_t tid;
struct kdbus_creds fake_creds; struct kdbus_creds fake_creds;
char *fake_label; char *fake_label;
char *cgroup_root; char *cgroup_root;
char *connection_name; char *connection_name;
skipping to change at line 389 skipping to change at line 386
* on */ * on */
#define BUS_DONT_DESTROY(bus) \ #define BUS_DONT_DESTROY(bus) \
_cleanup_bus_unref_ _unused_ sd_bus *_dont_destroy_##bus = sd_bus_r ef(bus) _cleanup_bus_unref_ _unused_ sd_bus *_dont_destroy_##bus = sd_bus_r ef(bus)
int bus_set_address_system(sd_bus *bus); int bus_set_address_system(sd_bus *bus);
int bus_set_address_user(sd_bus *bus); int bus_set_address_user(sd_bus *bus);
int bus_set_address_system_remote(sd_bus *b, const char *host); int bus_set_address_system_remote(sd_bus *b, const char *host);
int bus_set_address_system_container(sd_bus *b, const char *machine); int bus_set_address_system_container(sd_bus *b, const char *machine);
int bus_remove_match_by_string(sd_bus *bus, const char *match, sd_bus_messa ge_handler_t callback, void *userdata); int bus_remove_match_by_string(sd_bus *bus, const char *match, sd_bus_messa ge_handler_t callback, void *userdata);
int bus_get_root_path(sd_bus *bus);
 End of changes. 3 change blocks. 
6 lines changed or deleted 3 lines changed or added


 bus-kernel.h   bus-kernel.h 
skipping to change at line 68 skipping to change at line 68
size_t mapped; size_t mapped;
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); 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, BusNamePolicyAccess 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_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_create_monitor(const char *bus);
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);
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 bus-protocol.h   bus-protocol.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 <endian.h>
/* Endianness */ /* Endianness */
enum { enum {
_BUS_INVALID_ENDIAN = 0, _BUS_INVALID_ENDIAN = 0,
BUS_LITTLE_ENDIAN = 'l', BUS_LITTLE_ENDIAN = 'l',
BUS_BIG_ENDIAN = 'B', BUS_BIG_ENDIAN = 'B',
#if __BYTE_ORDER == __BIG_ENDIAN #if __BYTE_ORDER == __BIG_ENDIAN
BUS_NATIVE_ENDIAN = BUS_BIG_ENDIAN, BUS_NATIVE_ENDIAN = BUS_BIG_ENDIAN,
BUS_REVERSE_ENDIAN = BUS_LITTLE_ENDIAN BUS_REVERSE_ENDIAN = BUS_LITTLE_ENDIAN
#else #else
 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 65 skipping to change at line 65
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);
int bus_event_loop_with_idle(sd_event *e, sd_bus *bus, const char *name, us ec_t timeout, check_idle_t check_idle, void *userdata); int bus_event_loop_with_idle(sd_event *e, sd_bus *bus, const char *name, us ec_t timeout, check_idle_t check_idle, void *userdata);
int bus_name_has_owner(sd_bus *c, const char *name, sd_bus_error *error); int bus_name_has_owner(sd_bus *c, const char *name, sd_bus_error *error);
int bus_check_peercred(sd_bus *c); int bus_check_peercred(sd_bus *c);
int bus_verify_polkit(sd_bus *bus, sd_bus_message *m, const char *action, b ool interactive, bool *_challenge, sd_bus_error *e); int bus_verify_polkit(sd_bus_message *call, int capability, const char *act ion, bool interactive, bool *_challenge, sd_bus_error *e);
int bus_verify_polkit_async(sd_bus *bus, Hashmap **registry, sd_bus_message int bus_verify_polkit_async(sd_bus_message *call, int capability, const cha
*m, const char *action, bool interactive, sd_bus_error *error, sd_bus_mess r *action, bool interactive, Hashmap **registry, sd_bus_error *error);
age_handler_t callback, void *userdata); void bus_verify_polkit_async_registry_free(Hashmap *registry);
void bus_verify_polkit_async_registry_free(sd_bus *bus, Hashmap *registry);
int bus_open_system_systemd(sd_bus **_bus); int bus_open_system_systemd(sd_bus **_bus);
int bus_open_user_systemd(sd_bus **_bus); int bus_open_user_systemd(sd_bus **_bus);
int bus_open_transport(BusTransport transport, const char *host, bool user, sd_bus **bus); int bus_open_transport(BusTransport transport, const char *host, bool user, sd_bus **bus);
int bus_open_transport_systemd(BusTransport transport, const char *host, bo ol user, sd_bus **bus); int bus_open_transport_systemd(BusTransport transport, const char *host, bo ol user, sd_bus **bus);
int bus_print_property(const char *name, sd_bus_message *property, bool all ); int bus_print_property(const char *name, sd_bus_message *property, bool all );
int bus_print_all_properties(sd_bus *bus, const char *dest, const char *pat h, char **filter, bool all); int bus_print_all_properties(sd_bus *bus, const char *dest, const char *pat h, char **filter, bool all);
skipping to change at line 140 skipping to change at line 140
const char *sub_state; const char *sub_state;
const char *following; const char *following;
const char *unit_path; const char *unit_path;
uint32_t job_id; uint32_t job_id;
const char *job_type; const char *job_type;
const char *job_path; const char *job_path;
} UnitInfo; } UnitInfo;
int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u); int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u);
static inline void sd_bus_close_unrefp(sd_bus **bus) {
if (*bus) {
sd_bus_flush(*bus);
sd_bus_close(*bus);
sd_bus_unref(*bus);
}
}
DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus*, sd_bus_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus*, sd_bus_unref);
DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_slot*, sd_bus_slot_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_slot*, sd_bus_slot_unref);
DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_message*, sd_bus_message_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_message*, sd_bus_message_unref);
DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_creds*, sd_bus_creds_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_creds*, sd_bus_creds_unref);
DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_track*, sd_bus_track_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_track*, sd_bus_track_unref);
#define _cleanup_bus_unref_ _cleanup_(sd_bus_unrefp) #define _cleanup_bus_unref_ _cleanup_(sd_bus_unrefp)
#define _cleanup_bus_close_unref_ _cleanup_(sd_bus_close_unrefp)
#define _cleanup_bus_slot_unref_ _cleanup_(sd_bus_slot_unrefp) #define _cleanup_bus_slot_unref_ _cleanup_(sd_bus_slot_unrefp)
#define _cleanup_bus_message_unref_ _cleanup_(sd_bus_message_unrefp) #define _cleanup_bus_message_unref_ _cleanup_(sd_bus_message_unrefp)
#define _cleanup_bus_creds_unref_ _cleanup_(sd_bus_creds_unrefp) #define _cleanup_bus_creds_unref_ _cleanup_(sd_bus_creds_unrefp)
#define _cleanup_bus_track_unref_ _cleanup_(sd_bus_slot_unrefp) #define _cleanup_bus_track_unref_ _cleanup_(sd_bus_slot_unrefp)
#define _cleanup_bus_error_free_ _cleanup_(sd_bus_error_free) #define _cleanup_bus_error_free_ _cleanup_(sd_bus_error_free)
#define BUS_DEFINE_PROPERTY_GET_ENUM(function, name, type) \ #define BUS_DEFINE_PROPERTY_GET_ENUM(function, name, type) \
int function(sd_bus *bus, \ int function(sd_bus *bus, \
const char *path, \ const char *path, \
const char *interface, \ const char *interface, \
 End of changes. 4 change blocks. 
5 lines changed or deleted 13 lines changed or added


 clock-util.h   clock-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/>.
***/ ***/
int clock_is_localtime(void); int clock_is_localtime(void);
int clock_set_timezone(int *min); int clock_set_timezone(int *min);
int clock_reset_timezone(void); int clock_reset_timewarp(void);
int clock_get_hwclock(struct tm *tm); int clock_get_hwclock(struct tm *tm);
int clock_set_hwclock(const struct tm *tm); int clock_set_hwclock(const struct tm *tm);
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 compress.h   compress.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/>.
***/ ***/
#include <inttypes.h> #include <inttypes.h>
#include <stdbool.h> #include <stdbool.h>
#include <unistd.h> #include <unistd.h>
bool compress_blob(const void *src, uint64_t src_size, void *dst, uint64_t *dst_size); #include "journal-def.h"
bool uncompress_blob(const void *src, uint64_t src_size, const char* object_compressed_to_string(int compression);
void **dst, uint64_t *dst_alloc_size, uint64_t* dst_si int object_compressed_from_string(const char *compression);
ze, uint64_t dst_max);
bool uncompress_startswith(const void *src, uint64_t src_size, int compress_blob_xz(const void *src, uint64_t src_size, void *dst, size_t
void **buffer, uint64_t *buffer_size, *dst_size);
const void *prefix, uint64_t prefix_len, int compress_blob_lz4(const void *src, uint64_t src_size, void *dst, size_t
uint8_t extra); *dst_size);
int compress_stream(int fdf, int fdt, uint32_t preset, off_t max_size); static inline int compress_blob(const void *src, uint64_t src_size, void *d
int decompress_stream(int fdf, int fdt, off_t max_size); st, size_t *dst_size) {
int r;
#ifdef HAVE_LZ4
r = compress_blob_lz4(src, src_size, dst, dst_size);
if (r == 0)
return OBJECT_COMPRESSED_LZ4;
#else
r = compress_blob_xz(src, src_size, dst, dst_size);
if (r == 0)
return OBJECT_COMPRESSED_XZ;
#endif
return r;
}
int decompress_blob_xz(const void *src, uint64_t src_size,
void **dst, size_t *dst_alloc_size, size_t* dst_size
, size_t dst_max);
int decompress_blob_lz4(const void *src, uint64_t src_size,
void **dst, size_t *dst_alloc_size, size_t* dst_siz
e, size_t dst_max);
int decompress_blob(int compression,
const void *src, uint64_t src_size,
void **dst, size_t *dst_alloc_size, size_t* dst_size, s
ize_t dst_max);
int decompress_startswith_xz(const void *src, uint64_t src_size,
void **buffer, size_t *buffer_size,
const void *prefix, size_t prefix_len,
uint8_t extra);
int decompress_startswith_lz4(const void *src, uint64_t src_size,
void **buffer, size_t *buffer_size,
const void *prefix, size_t prefix_len,
uint8_t extra);
int decompress_startswith(int compression,
const void *src, uint64_t src_size,
void **buffer, size_t *buffer_size,
const void *prefix, size_t prefix_len,
uint8_t extra);
int compress_stream_xz(int fdf, int fdt, off_t max_bytes);
int compress_stream_lz4(int fdf, int fdt, off_t max_bytes);
int decompress_stream_xz(int fdf, int fdt, off_t max_size);
int decompress_stream_lz4(int fdf, int fdt, off_t max_size);
#ifdef HAVE_LZ4
# define compress_stream compress_stream_lz4
# define COMPRESSED_EXT ".lz4"
#else
# define compress_stream compress_stream_xz
# define COMPRESSED_EXT ".xz"
#endif
int decompress_stream(const char *filename, int fdf, int fdt, off_t max_byt
es);
 End of changes. 4 change blocks. 
8 lines changed or deleted 7 lines changed or added


 condition-util.h   condition-util.h 
skipping to change at line 48 skipping to change at line 48
CONDITION_FILE_NOT_EMPTY, CONDITION_FILE_NOT_EMPTY,
CONDITION_FILE_IS_EXECUTABLE, CONDITION_FILE_IS_EXECUTABLE,
CONDITION_KERNEL_COMMAND_LINE, CONDITION_KERNEL_COMMAND_LINE,
CONDITION_VIRTUALIZATION, CONDITION_VIRTUALIZATION,
CONDITION_SECURITY, CONDITION_SECURITY,
CONDITION_CAPABILITY, CONDITION_CAPABILITY,
CONDITION_HOST, CONDITION_HOST,
CONDITION_AC_POWER, CONDITION_AC_POWER,
CONDITION_ARCHITECTURE, CONDITION_ARCHITECTURE,
CONDITION_NEEDS_UPDATE, CONDITION_NEEDS_UPDATE,
CONDITION_FIRST_BOOT,
CONDITION_NULL, CONDITION_NULL,
_CONDITION_TYPE_MAX, _CONDITION_TYPE_MAX,
_CONDITION_TYPE_INVALID = -1 _CONDITION_TYPE_INVALID = -1
} ConditionType; } ConditionType;
typedef struct Condition { typedef struct Condition {
ConditionType type; ConditionType type;
bool trigger:1; bool trigger:1;
bool negate:1; bool negate:1;
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 conf-parser.h   conf-parser.h 
skipping to change at line 68 skipping to change at line 68
ConfigParserCallback parse; /* Function that is called to parse the variable's value */ ConfigParserCallback parse; /* Function that is called to parse the variable's value */
int ltype; /* Distinguish different variables passed to the same callback */ int ltype; /* Distinguish different variables passed to the same callback */
size_t offset; /* Offset where to store data, from the beginning of userdata */ size_t offset; /* Offset where to store data, from the beginning of userdata */
} ConfigPerfItem; } ConfigPerfItem;
/* Prototype for a low-level gperf lookup function */ /* Prototype for a low-level gperf lookup function */
typedef const ConfigPerfItem* (*ConfigPerfItemLookup)(const char *section_a nd_lvalue, unsigned length); typedef const ConfigPerfItem* (*ConfigPerfItemLookup)(const char *section_a nd_lvalue, unsigned length);
/* Prototype for a generic high-level lookup function */ /* Prototype for a generic high-level lookup function */
typedef int (*ConfigItemLookup)( typedef int (*ConfigItemLookup)(
void *table, const void *table,
const char *section, const char *section,
const char *lvalue, const char *lvalue,
ConfigParserCallback *func, ConfigParserCallback *func,
int *ltype, int *ltype,
void **data, void **data,
void *userdata); void *userdata);
/* Linear table search implementation of ConfigItemLookup, based on /* Linear table search implementation of ConfigItemLookup, based on
* ConfigTableItem arrays */ * ConfigTableItem arrays */
int config_item_table_lookup(void *table, const char *section, const char * lvalue, ConfigParserCallback *func, int *ltype, void **data, void *userdata ); int config_item_table_lookup(const void *table, const char *section, const char *lvalue, ConfigParserCallback *func, int *ltype, void **data, void *us erdata);
/* gperf implementation of ConfigItemLookup, based on gperf /* gperf implementation of ConfigItemLookup, based on gperf
* ConfigPerfItem tables */ * ConfigPerfItem tables */
int config_item_perf_lookup(void *table, const char *section, const char *l value, ConfigParserCallback *func, int *ltype, void **data, void *userdata) ; int config_item_perf_lookup(const void *table, const char *section, const c har *lvalue, ConfigParserCallback *func, int *ltype, void **data, void *use rdata);
int config_parse(const char *unit, int config_parse(const char *unit,
const char *filename, const char *filename,
FILE *f, FILE *f,
const char *sections, /* nulstr */ const char *sections, /* nulstr */
ConfigItemLookup lookup, ConfigItemLookup lookup,
void *table, const void *table,
bool relaxed, bool relaxed,
bool allow_include, bool allow_include,
bool warn,
void *userdata); void *userdata);
/* Generic parsers */ /* Generic parsers */
int config_parse_int(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_int(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_unsigned(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int l type, const char *rvalue, void *data, void *userdata); int config_parse_unsigned(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int l type, const char *rvalue, void *data, void *userdata);
int config_parse_long(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_long(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_uint64(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_uint64(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_double(const char *unit, const char *filename, unsigned li ne, const char *section, unsigned section_line, const char *lvalue, int lt ype, const char *rvalue, void *data, void *userdata); int config_parse_double(const char *unit, const char *filename, unsigned li ne, const char *section, unsigned section_line, const char *lvalue, int lt ype, const char *rvalue, void *data, void *userdata);
int config_parse_iec_size(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int l type, const char *rvalue, void *data, void *userdata); int config_parse_iec_size(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int l type, const char *rvalue, void *data, void *userdata);
int config_parse_si_size(const char *unit, const char *filename, unsigned l ine, const char *section, unsigned section_line, const char *lvalue, int lt ype, const char *rvalue, void *data, void *userdata); int config_parse_si_size(const char *unit, const char *filename, unsigned l ine, const char *section, unsigned section_line, const char *lvalue, int lt ype, const char *rvalue, void *data, void *userdata);
skipping to change at line 172 skipping to change at line 173
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, *xs, x, *ys; \
char *w, *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); \
*xs = invalid; \ *xs = invalid; \
\ \
FOREACH_WORD(w, l, rvalue, state) { \ FOREACH_WORD(word, l, rvalue, state) { \
_cleanup_free_ char *en = NULL; \ _cleanup_free_ char *en = NULL; \
\ \
en = strndup(w, 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; \
} \ } \
\ \
for (ys = xs; x != invalid && *ys != invalid; ys++) { \ for (ys = xs; x != invalid && *ys != invalid; ys++) { \
 End of changes. 8 change blocks. 
7 lines changed or deleted 8 lines changed or added


 config.h   config.h 
skipping to change at line 25 skipping to change at line 25
/* Define if kdbus support is to be enabled */ /* Define if kdbus support is to be enabled */
/* #undef ENABLE_KDBUS */ /* #undef ENABLE_KDBUS */
/* Define if networkd support is to be enabled */ /* Define if networkd support is to be enabled */
#define ENABLE_NETWORKD 1 #define ENABLE_NETWORKD 1
/* Define if PolicyKit support is to be enabled */ /* Define if PolicyKit support is to be enabled */
#define ENABLE_POLKIT 1 #define ENABLE_POLKIT 1
/* Define if terminal support is to be enabled */
/* #undef ENABLE_TERMINAL */
/* ACL available */ /* ACL available */
#define HAVE_ACL 1 #define HAVE_ACL 1
/* Define to 1 if you have the <acl/libacl.h> header file. */ /* Define to 1 if you have the <acl/libacl.h> header file. */
#define HAVE_ACL_LIBACL_H 1 #define HAVE_ACL_LIBACL_H 1
/* Define if AppArmor is available */ /* Define if AppArmor is available */
/* #undef HAVE_APPARMOR */ /* #undef HAVE_APPARMOR */
/* Define to 1 if you have the <arpa/inet.h> header file. */ /* Define to 1 if you have the <arpa/inet.h> header file. */
skipping to change at line 65 skipping to change at line 68
#define HAVE_DECL_IFLA_BOND_AD_INFO 0 #define HAVE_DECL_IFLA_BOND_AD_INFO 0
/* Define to 1 if you have the declaration of `IFLA_BRIDGE_VLAN_INFO', and to /* Define to 1 if you have the declaration of `IFLA_BRIDGE_VLAN_INFO', and to
0 if you don't. */ 0 if you don't. */
#define HAVE_DECL_IFLA_BRIDGE_VLAN_INFO 0 #define HAVE_DECL_IFLA_BRIDGE_VLAN_INFO 0
/* Define to 1 if you have the declaration of /* Define to 1 if you have the declaration of
`IFLA_IPTUN_6RD_RELAY_PREFIXLEN', and to 0 if you don't. */ `IFLA_IPTUN_6RD_RELAY_PREFIXLEN', and to 0 if you don't. */
#define HAVE_DECL_IFLA_IPTUN_6RD_RELAY_PREFIXLEN 0 #define HAVE_DECL_IFLA_IPTUN_6RD_RELAY_PREFIXLEN 0
/* Define to 1 if you have the declaration of `IFLA_MACVLAN_FLAGS', and to
0
if you don't. */
#define HAVE_DECL_IFLA_MACVLAN_FLAGS 1
/* Define to 1 if you have the declaration of `IFLA_PHYS_PORT_ID', and to 0 if /* Define to 1 if you have the declaration of `IFLA_PHYS_PORT_ID', and to 0 if
you don't. */ you don't. */
#define HAVE_DECL_IFLA_PHYS_PORT_ID 0 #define HAVE_DECL_IFLA_PHYS_PORT_ID 0
/* Define to 1 if you have the declaration of `IFLA_VLAN_PROTOCOL', and to 0 /* Define to 1 if you have the declaration of `IFLA_VLAN_PROTOCOL', and to 0
if you don't. */ if you don't. */
#define HAVE_DECL_IFLA_VLAN_PROTOCOL 0 #define HAVE_DECL_IFLA_VLAN_PROTOCOL 0
/* Define to 1 if you have the declaration of `IFLA_VTI_REMOTE', and to 0 i
f
you don't. */
#define HAVE_DECL_IFLA_VTI_REMOTE 1
/* Define to 1 if you have the declaration of `IFLA_VXLAN_LOCAL6', and to 0 if /* Define to 1 if you have the declaration of `IFLA_VXLAN_LOCAL6', and to 0 if
you don't. */ you don't. */
#define HAVE_DECL_IFLA_VXLAN_LOCAL6 0 #define HAVE_DECL_IFLA_VXLAN_LOCAL6 0
/* Define to 1 if you have the declaration of `LO_FLAGS_PARTSCAN', and to 0 if /* Define to 1 if you have the declaration of `LO_FLAGS_PARTSCAN', and to 0 if
you don't. */ you don't. */
#define HAVE_DECL_LO_FLAGS_PARTSCAN 1 #define HAVE_DECL_LO_FLAGS_PARTSCAN 1
/* Define to 1 if you have the declaration of `name_to_handle_at', and to 0 if /* Define to 1 if you have the declaration of `name_to_handle_at', and to 0 if
you don't. */ you don't. */
skipping to change at line 150 skipping to change at line 161
/* Define if kmod is available */ /* Define if kmod is available */
/* #undef HAVE_KMOD */ /* #undef HAVE_KMOD */
/* Define to 1 if you have the <libaudit.h> header file. */ /* Define to 1 if you have the <libaudit.h> header file. */
#define HAVE_LIBAUDIT_H 1 #define HAVE_LIBAUDIT_H 1
/* Define if libcryptsetup is available */ /* Define if libcryptsetup is available */
/* #undef HAVE_LIBCRYPTSETUP */ /* #undef HAVE_LIBCRYPTSETUP */
/* Define if libcurl is available */
#define HAVE_LIBCURL 1
/* 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 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 */
/* Logind support available */ /* Logind support available */
#define HAVE_LOGIND 1 #define HAVE_LOGIND 1
/* Define in LZ4 is available */
/* #undef HAVE_LZ4 */
/* Define to 1 if you have the <lz4.h> header file. */
/* #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 <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
skipping to change at line 318 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 215" #define PACKAGE_STRING "systemd 216"
/* 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 "215" #define PACKAGE_VERSION "216"
/* 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
/* Define to the type of args 2, 3 and 4 for `select'. */ /* Define to the type of args 2, 3 and 4 for `select'. */
#define SELECT_TYPE_ARG234 (fd_set *) #define SELECT_TYPE_ARG234 (fd_set *)
/* Define to the type of arg 5 for `select'. */ /* Define to the type of arg 5 for `select'. */
#define SELECT_TYPE_ARG5 (struct timeval *) #define SELECT_TYPE_ARG5 (struct timeval *)
/* The size of `dev_t', as computed by sizeof. */
#define SIZEOF_DEV_T 8
/* The size of `gid_t', as computed by sizeof. */ /* The size of `gid_t', as computed by sizeof. */
#define SIZEOF_GID_T 4 #define SIZEOF_GID_T 4
/* The size of `pid_t', as computed by sizeof. */ /* The size of `pid_t', as computed by sizeof. */
#define SIZEOF_PID_T 4 #define SIZEOF_PID_T 4
/* The size of `rlim_t', as computed by sizeof. */ /* The size of `rlim_t', as computed by sizeof. */
#define SIZEOF_RLIM_T 8 #define SIZEOF_RLIM_T 8
/* The size of `time_t', as computed by sizeof. */ /* The size of `time_t', as computed by sizeof. */
skipping to change at line 375 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 1404413182 #define TIME_EPOCH 1408486694
/* 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 405 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 "215" #define VERSION "216"
/* 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. 11 change blocks. 
4 lines changed or deleted 32 lines changed or added


 dbus-job.h   dbus-job.h 
skipping to change at line 29 skipping to change at line 29
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 "job.h" #include "job.h"
extern const sd_bus_vtable bus_job_vtable[]; extern const sd_bus_vtable bus_job_vtable[];
int bus_job_method_cancel(sd_bus *bus, sd_bus_message *message, void *job,
sd_bus_error *error);
void bus_job_send_change_signal(Job *j); void bus_job_send_change_signal(Job *j);
void bus_job_send_removed_signal(Job *j); void bus_job_send_removed_signal(Job *j);
 End of changes. 1 change blocks. 
0 lines changed or deleted 3 lines changed or added


 dbus.h   dbus.h 
skipping to change at line 38 skipping to change at line 38
int bus_init(Manager *m, bool try_bus_connect); int bus_init(Manager *m, bool try_bus_connect);
void bus_done(Manager *m); void bus_done(Manager *m);
int bus_fdset_add_all(Manager *m, FDSet *fds); int bus_fdset_add_all(Manager *m, FDSet *fds);
void bus_track_serialize(sd_bus_track *t, FILE *f); void bus_track_serialize(sd_bus_track *t, FILE *f);
int bus_track_deserialize_item(char ***l, const char *line); int bus_track_deserialize_item(char ***l, const char *line);
int bus_track_coldplug(Manager *m, sd_bus_track **t, char ***l); int bus_track_coldplug(Manager *m, sd_bus_track **t, char ***l);
int bus_foreach_bus(Manager *m, sd_bus_track *subscribed2, int (*send_messa ge)(sd_bus *bus, void *userdata), void *userdata); int bus_foreach_bus(Manager *m, sd_bus_track *subscribed2, int (*send_messa ge)(sd_bus *bus, void *userdata), void *userdata);
int bus_verify_manage_unit_async(Manager *m, sd_bus_message *call, sd_bus_e
rror *error);
int bus_verify_manage_unit_async_for_kill(Manager *m, sd_bus_message *call,
sd_bus_error *error);
int bus_verify_manage_unit_files_async(Manager *m, sd_bus_message *call, sd
_bus_error *error);
int bus_verify_reload_daemon_async(Manager *m, sd_bus_message *call, sd_bus
_error *error);
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added


 def.h   def.h 
skipping to change at line 76 skipping to change at line 76
#ifdef ENABLE_KDBUS #ifdef ENABLE_KDBUS
# define DEFAULT_SYSTEM_BUS_PATH KERNEL_SYSTEM_BUS_PATH ";" UNIX_SYSTEM_BU S_PATH # define DEFAULT_SYSTEM_BUS_PATH KERNEL_SYSTEM_BUS_PATH ";" UNIX_SYSTEM_BU S_PATH
#else #else
# define DEFAULT_SYSTEM_BUS_PATH UNIX_SYSTEM_BUS_PATH # define DEFAULT_SYSTEM_BUS_PATH UNIX_SYSTEM_BUS_PATH
#endif #endif
#define UNIX_USER_BUS_FMT "unix:path=%s/bus" #define UNIX_USER_BUS_FMT "unix:path=%s/bus"
#define KERNEL_USER_BUS_FMT "kernel:path=/dev/kdbus/"UID_FMT"-user/bus" #define KERNEL_USER_BUS_FMT "kernel:path=/dev/kdbus/"UID_FMT"-user/bus"
#define PLYMOUTH_SOCKET { \
.un.sun_family = AF_UNIX, \
.un.sun_path = "\0/org/freedesktop/plymouthd", \
}
#ifndef TTY_GID #ifndef TTY_GID
#define TTY_GID 5 #define TTY_GID 5
#endif #endif
 End of changes. 1 change blocks. 
0 lines changed or deleted 5 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/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 t32_t xid); int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link, uin t32_t xid, struct ether_addr mac_addr);
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,
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 dhcp-protocol.h   dhcp-protocol.h 
skipping to change at line 63 skipping to change at line 63
struct iphdr ip; struct iphdr ip;
struct udphdr udp; struct udphdr udp;
DHCPMessage dhcp; DHCPMessage dhcp;
} _packed_; } _packed_;
typedef struct DHCPPacket DHCPPacket; typedef struct DHCPPacket DHCPPacket;
#define DHCP_IP_SIZE (int32_t)(sizeof(struct iphdr)) #define DHCP_IP_SIZE (int32_t)(sizeof(struct iphdr))
#define DHCP_IP_UDP_SIZE (int32_t)(sizeof(struct udphdr) + DHCP_IP_S IZE) #define DHCP_IP_UDP_SIZE (int32_t)(sizeof(struct udphdr) + DHCP_IP_S IZE)
#define DHCP_MESSAGE_SIZE (int32_t)(sizeof(DHCPMessage)) #define DHCP_MESSAGE_SIZE (int32_t)(sizeof(DHCPMessage))
#define DHCP_MIN_OPTIONS_SIZE 308 /* spec says 312, but that includes the #define DHCP_DEFAULT_MIN_SIZE 576 /* the minimum internet hosts must be a
magic cookie */ ble to receive */
#define DHCP_MIN_OPTIONS_SIZE DHCP_DEFAULT_MIN_SIZE - DHCP_IP_UDP_SIZE -
DHCP_MESSAGE_SIZE
#define DHCP_MAGIC_COOKIE (uint32_t)(0x63825363) #define DHCP_MAGIC_COOKIE (uint32_t)(0x63825363)
enum { enum {
DHCP_PORT_SERVER = 67, DHCP_PORT_SERVER = 67,
DHCP_PORT_CLIENT = 68, DHCP_PORT_CLIENT = 68,
}; };
enum DHCPState { enum DHCPState {
DHCP_STATE_INIT = 0, DHCP_STATE_INIT = 0,
DHCP_STATE_SELECTING = 1, DHCP_STATE_SELECTING = 1,
skipping to change at line 98 skipping to change at line 99
}; };
enum { enum {
DHCP_DISCOVER = 1, DHCP_DISCOVER = 1,
DHCP_OFFER = 2, DHCP_OFFER = 2,
DHCP_REQUEST = 3, DHCP_REQUEST = 3,
DHCP_DECLINE = 4, DHCP_DECLINE = 4,
DHCP_ACK = 5, DHCP_ACK = 5,
DHCP_NAK = 6, DHCP_NAK = 6,
DHCP_RELEASE = 7, DHCP_RELEASE = 7,
DHCP_INFORM = 8,
DHCP_FORCERENEW = 9,
}; };
enum { enum {
DHCP_OVERLOAD_FILE = 1, DHCP_OVERLOAD_FILE = 1,
DHCP_OVERLOAD_SNAME = 2, DHCP_OVERLOAD_SNAME = 2,
}; };
enum { enum {
DHCP_OPTION_PAD = 0, DHCP_OPTION_PAD = 0,
DHCP_OPTION_SUBNET_MASK = 1, DHCP_OPTION_SUBNET_MASK = 1,
skipping to change at line 134 skipping to change at line 137
DHCP_OPTION_NTP_SERVER = 42, DHCP_OPTION_NTP_SERVER = 42,
DHCP_OPTION_REQUESTED_IP_ADDRESS = 50, DHCP_OPTION_REQUESTED_IP_ADDRESS = 50,
DHCP_OPTION_IP_ADDRESS_LEASE_TIME = 51, DHCP_OPTION_IP_ADDRESS_LEASE_TIME = 51,
DHCP_OPTION_OVERLOAD = 52, DHCP_OPTION_OVERLOAD = 52,
DHCP_OPTION_MESSAGE_TYPE = 53, DHCP_OPTION_MESSAGE_TYPE = 53,
DHCP_OPTION_SERVER_IDENTIFIER = 54, DHCP_OPTION_SERVER_IDENTIFIER = 54,
DHCP_OPTION_PARAMETER_REQUEST_LIST = 55, DHCP_OPTION_PARAMETER_REQUEST_LIST = 55,
DHCP_OPTION_MAXIMUM_MESSAGE_SIZE = 57, DHCP_OPTION_MAXIMUM_MESSAGE_SIZE = 57,
DHCP_OPTION_RENEWAL_T1_TIME = 58, DHCP_OPTION_RENEWAL_T1_TIME = 58,
DHCP_OPTION_REBINDING_T2_TIME = 59, DHCP_OPTION_REBINDING_T2_TIME = 59,
DHCP_OPTION_VENDOR_CLASS_IDENTIFIER = 60,
DHCP_OPTION_CLIENT_IDENTIFIER = 61, DHCP_OPTION_CLIENT_IDENTIFIER = 61,
DHCP_OPTION_CLASSLESS_STATIC_ROUTE = 121, DHCP_OPTION_CLASSLESS_STATIC_ROUTE = 121,
DHCP_OPTION_END = 255, DHCP_OPTION_END = 255,
}; };
 End of changes. 3 change blocks. 
2 lines changed or deleted 7 lines changed or added


 dhcp-server-internal.h   dhcp-server-internal.h 
skipping to change at line 42 skipping to change at line 42
typedef struct DHCPClientId { typedef struct DHCPClientId {
size_t length; size_t length;
uint8_t *data; uint8_t *data;
} DHCPClientId; } DHCPClientId;
typedef struct DHCPLease { typedef struct DHCPLease {
DHCPClientId client_id; DHCPClientId client_id;
be32_t address; be32_t address;
be32_t gateway;
uint8_t chaddr[16];
usec_t expiration; usec_t expiration;
} DHCPLease; } DHCPLease;
struct sd_dhcp_server { struct sd_dhcp_server {
RefCount n_ref; RefCount n_ref;
sd_event *event; sd_event *event;
int event_priority; int event_priority;
sd_event_source *receive_message; sd_event_source *receive_message;
int fd; int fd;
int fd_raw; int fd_raw;
int index; int index;
be32_t address; be32_t address;
be32_t netmask;
be32_t pool_start; be32_t pool_start;
size_t pool_size; size_t pool_size;
size_t next_offer; size_t next_offer;
Hashmap *leases_by_client_id; Hashmap *leases_by_client_id;
DHCPLease **bound_leases; DHCPLease **bound_leases;
}; };
typedef struct DHCPRequest { typedef struct DHCPRequest {
/* received message */ /* received message */
 End of changes. 2 change blocks. 
0 lines changed or deleted 3 lines changed or added


 dhcp6-protocol.h   dhcp6-protocol.h 
skipping to change at line 74 skipping to change at line 74
enum { enum {
DHCP6_DUID_LLT = 1, DHCP6_DUID_LLT = 1,
DHCP6_DUID_EN = 2, DHCP6_DUID_EN = 2,
DHCP6_DUID_LL = 3, DHCP6_DUID_LL = 3,
DHCP6_DUID_UUID = 4, DHCP6_DUID_UUID = 4,
}; };
enum DHCP6State { enum DHCP6State {
DHCP6_STATE_STOPPED = 0, DHCP6_STATE_STOPPED = 0,
DHCP6_STATE_RS = 1,
DHCP6_STATE_SOLICITATION = 2, DHCP6_STATE_SOLICITATION = 2,
DHCP6_STATE_REQUEST = 3, DHCP6_STATE_REQUEST = 3,
DHCP6_STATE_BOUND = 4, DHCP6_STATE_BOUND = 4,
DHCP6_STATE_RENEW = 5, DHCP6_STATE_RENEW = 5,
DHCP6_STATE_REBIND = 6, DHCP6_STATE_REBIND = 6,
}; };
enum { enum {
DHCP6_SOLICIT = 1, DHCP6_SOLICIT = 1,
DHCP6_ADVERTISE = 2, DHCP6_ADVERTISE = 2,
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 dropin.h   dropin.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 "macro.h"
int drop_in_file(const char *dir, const char *unit, unsigned level, int drop_in_file(const char *dir, const char *unit, unsigned level,
const char *name, char **_p, char **_q); const char *name, char **_p, char **_q);
int write_drop_in(const char *dir, const char *unit, unsigned level, int write_drop_in(const char *dir, const char *unit, unsigned level,
const char *name, const char *data); const char *name, const char *data);
int write_drop_in_format(const char *dir, const char *unit, unsigned level, int write_drop_in_format(const char *dir, const char *unit, unsigned level,
const char *name, const char *format, ...); const char *name, const char *format, ...) _printf _(5, 6);
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added


 event-util.h   event-util.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 "util.h" #include "util.h"
#include "sd-event.h"
DEFINE_TRIVIAL_CLEANUP_FUNC(sd_event*, sd_event_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(sd_event*, sd_event_unref);
DEFINE_TRIVIAL_CLEANUP_FUNC(sd_event_source*, sd_event_source_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(sd_event_source*, sd_event_source_unref);
#define _cleanup_event_unref_ _cleanup_(sd_event_unrefp) #define _cleanup_event_unref_ _cleanup_(sd_event_unrefp)
#define _cleanup_event_source_unref_ _cleanup_(sd_event_source_unrefp) #define _cleanup_event_source_unref_ _cleanup_(sd_event_source_unrefp)
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 fileio-label.h   fileio-label.h 
skipping to change at line 30 skipping to change at line 30
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 <stdio.h> #include <stdio.h>
#include "fileio.h" #include "fileio.h"
int write_string_file_atomic_label(const char *fn, const char *line); int write_string_file_atomic_label(const char *fn, const char *line);
int write_env_file_label(const char *fname, char **l); int write_env_file_label(const char *fname, char **l);
int fopen_temporary_label(const char *target,
const char *path, FILE **f, char **temp_path);
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added


 fileio.h   fileio.h 
skipping to change at line 30 skipping to change at line 30
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 <stddef.h> #include <stddef.h>
#include <stdio.h> #include <stdio.h>
#include "macro.h" #include "macro.h"
int write_string_stream(FILE *f, const char *line); int write_string_stream(FILE *f, const char *line);
int write_string_file(const char *fn, const char *line); int write_string_file(const char *fn, const char *line);
int write_string_file_no_create(const char *fn, const char *line);
int write_string_file_atomic(const char *fn, const char *line); int write_string_file_atomic(const char *fn, const char *line);
int read_one_line_file(const char *fn, char **line); int read_one_line_file(const char *fn, char **line);
int read_full_file(const char *fn, char **contents, size_t *size); int read_full_file(const char *fn, char **contents, size_t *size);
int read_full_stream(FILE *f, char **contents, size_t *size); int read_full_stream(FILE *f, char **contents, size_t *size);
ssize_t sendfile_full(int out_fd, const char *fn); ssize_t sendfile_full(int out_fd, const char *fn);
int parse_env_file(const char *fname, const char *separator, ...) _sentinel _; int parse_env_file(const char *fname, const char *separator, ...) _sentinel _;
int load_env_file(FILE *f, const char *fname, const char *separator, char * **l); int load_env_file(FILE *f, const char *fname, const char *separator, char * **l);
int load_env_file_pairs(FILE *f, const char *fname, const char *separator, char ***l); int load_env_file_pairs(FILE *f, const char *fname, const char *separator, char ***l);
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 gpt.h   gpt.h 
skipping to change at line 22 skipping to change at line 22
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 <endian.h>
#include "sd-id128.h" #include "sd-id128.h"
/* We only support root disk discovery for x86, x86-64 and ARM for /* We only support root disk discovery for x86, x86-64 and ARM for
* now, since EFI for anything else doesn't really exist, and we only * now, since EFI for anything else doesn't really exist, and we only
* care for root partitions on the same disk as the EFI ESP. */ * care for root partitions on the same disk as the EFI ESP. */
#define GPT_ROOT_X86 SD_ID128_MAKE(44,47,95,40,f2,97,41,b2,9a,f7,d1,31,d 5,f0,45,8a) #define GPT_ROOT_X86 SD_ID128_MAKE(44,47,95,40,f2,97,41,b2,9a,f7,d1,31,d 5,f0,45,8a)
#define GPT_ROOT_X86_64 SD_ID128_MAKE(4f,68,bc,e3,e8,cd,4d,b1,96,e7,fb,ca,f 9,84,b7,09) #define GPT_ROOT_X86_64 SD_ID128_MAKE(4f,68,bc,e3,e8,cd,4d,b1,96,e7,fb,ca,f 9,84,b7,09)
#define GPT_ROOT_ARM SD_ID128_MAKE(69,da,d7,10,2c,e4,4e,3c,b1,6c,21,a1,d 4,9a,be,d3) #define GPT_ROOT_ARM SD_ID128_MAKE(69,da,d7,10,2c,e4,4e,3c,b1,6c,21,a1,d 4,9a,be,d3)
#define GPT_ROOT_ARM_64 SD_ID128_MAKE(b9,21,b0,45,1d,f0,41,c3,af,44,4c,6f,2 8,0d,3f,ae) #define GPT_ROOT_ARM_64 SD_ID128_MAKE(b9,21,b0,45,1d,f0,41,c3,af,44,4c,6f,2 8,0d,3f,ae)
skipping to change at line 45 skipping to change at line 47
#define GPT_HOME SD_ID128_MAKE(93,3a,c7,e1,2e,b4,4f,13,b8,44,0e,14,e 2,ae,f9,15) #define GPT_HOME SD_ID128_MAKE(93,3a,c7,e1,2e,b4,4f,13,b8,44,0e,14,e 2,ae,f9,15)
#define GPT_SRV SD_ID128_MAKE(3b,8f,84,25,20,e0,4f,3b,90,7f,1a,25,a 7,6f,98,e8) #define GPT_SRV SD_ID128_MAKE(3b,8f,84,25,20,e0,4f,3b,90,7f,1a,25,a 7,6f,98,e8)
#if defined(__x86_64__) #if defined(__x86_64__)
# define GPT_ROOT_NATIVE GPT_ROOT_X86_64 # define GPT_ROOT_NATIVE GPT_ROOT_X86_64
# define GPT_ROOT_SECONDARY GPT_ROOT_X86 # define GPT_ROOT_SECONDARY GPT_ROOT_X86
#elif defined(__i386__) #elif defined(__i386__)
# define GPT_ROOT_NATIVE GPT_ROOT_X86 # define GPT_ROOT_NATIVE GPT_ROOT_X86
#endif #endif
#if defined(__aarch64__) && !defined(WORDS_BIGENDIAN) #if defined(__aarch64__) && (__BYTE_ORDER != __BIG_ENDIAN)
# define GPT_ROOT_NATIVE GPT_ROOT_ARM_64 # define GPT_ROOT_NATIVE GPT_ROOT_ARM_64
# define GPT_ROOT_SECONDARY GPT_ROOT_ARM # define GPT_ROOT_SECONDARY GPT_ROOT_ARM
#elif defined(__arm__) && !defined(WORDS_BIGENDIAN) #elif defined(__arm__) && (__BYTE_ORDER != __BIG_ENDIAN)
# define GPT_ROOT_NATIVE GPT_ROOT_ARM # define GPT_ROOT_NATIVE GPT_ROOT_ARM
#endif #endif
/* Flags we recognize on the root, swap, home and srv partitions when /* Flags we recognize on the root, swap, home and srv partitions when
* doing auto-discovery. These happen to be identical to what * doing auto-discovery. These happen to be identical to what
* Microsoft defines for its own Basic Data Partitions, but that's * Microsoft defines for its own Basic Data Partitions, but that's
* just because we saw no point in defining any other values here. */ * just because we saw no point in defining any other values here. */
#define GPT_FLAG_READ_ONLY (1ULL << 60) #define GPT_FLAG_READ_ONLY (1ULL << 60)
#define GPT_FLAG_NO_AUTO (1ULL << 63) #define GPT_FLAG_NO_AUTO (1ULL << 63)
 End of changes. 3 change blocks. 
2 lines changed or deleted 4 lines changed or added


 hashmap.h   hashmap.h 
skipping to change at line 55 skipping to change at line 55
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_;
/* 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_;
/* 32bit values we can always just embedd in the pointer itself, but
* in order to support 32bit archs we need store 64bit values
* 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_;
/* 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! */
#if SIZEOF_DEV_T != 8
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_;
#else
/* No need to define a second version of this... */
#define devt_hash_func uint64_hash_func
#define devt_compare_func uint64_compare_func
#endif
Hashmap *hashmap_new(hash_func_t hash_func, compare_func_t compare_func); Hashmap *hashmap_new(hash_func_t hash_func, compare_func_t compare_func);
void hashmap_free(Hashmap *h); void hashmap_free(Hashmap *h);
void hashmap_free_free(Hashmap *h); void hashmap_free_free(Hashmap *h);
void hashmap_free_free_free(Hashmap *h); void 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 nc_t compare_func); int hashmap_ensure_allocated(Hashmap **h, hash_func_t hash_func, compare_fu nc_t compare_func);
int hashmap_put(Hashmap *h, const void *key, void *value); int hashmap_put(Hashmap *h, const void *key, void *value);
int hashmap_update(Hashmap *h, const void *key, void *value); int hashmap_update(Hashmap *h, const void *key, void *value);
int hashmap_replace(Hashmap *h, const void *key, void *value); int hashmap_replace(Hashmap *h, const void *key, void *value);
 End of changes. 2 change blocks. 
0 lines changed or deleted 15 lines changed or added


 install.h   install.h 
skipping to change at line 52 skipping to change at line 52
UNIT_FILE_DISABLED, UNIT_FILE_DISABLED,
UNIT_FILE_INVALID, UNIT_FILE_INVALID,
_UNIT_FILE_STATE_MAX, _UNIT_FILE_STATE_MAX,
_UNIT_FILE_STATE_INVALID = -1 _UNIT_FILE_STATE_INVALID = -1
} UnitFileState; } UnitFileState;
typedef enum UnitFilePresetMode { typedef enum UnitFilePresetMode {
UNIT_FILE_PRESET_FULL, UNIT_FILE_PRESET_FULL,
UNIT_FILE_PRESET_ENABLE_ONLY, UNIT_FILE_PRESET_ENABLE_ONLY,
UNIT_FILE_PRESET_DISABLE_ONLY, UNIT_FILE_PRESET_DISABLE_ONLY,
_UNIT_FILE_PRESET_MODE_MAX, _UNIT_FILE_PRESET_MAX,
_UNIT_FILE_PRESET_INVALID = -1 _UNIT_FILE_PRESET_INVALID = -1
} UnitFilePresetMode; } UnitFilePresetMode;
typedef enum UnitFileChangeType { typedef enum UnitFileChangeType {
UNIT_FILE_SYMLINK, UNIT_FILE_SYMLINK,
UNIT_FILE_UNLINK, UNIT_FILE_UNLINK,
_UNIT_FILE_CHANGE_TYPE_MAX, _UNIT_FILE_CHANGE_TYPE_MAX,
_UNIT_FILE_CHANGE_TYPE_INVALID = -1 _UNIT_FILE_CHANGE_TYPE_INVALID = -1
} UnitFileChangeType; } UnitFileChangeType;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 job.h   job.h 
skipping to change at line 148 skipping to change at line 148
unsigned generation; unsigned generation;
uint32_t id; uint32_t id;
JobType type; JobType type;
JobState state; JobState state;
sd_event_source *timer_event_source; sd_event_source *timer_event_source;
usec_t begin_usec; usec_t begin_usec;
/* There can be more than one client, because of job merging. */ /*
sd_bus_track *subscribed; * This tracks where to send signals, and also which clients
char **deserialized_subscribed; * are allowed to call DBus methods on the job (other than
* root).
*
* There can be more than one client, because of job merging.
*/
sd_bus_track *clients;
char **deserialized_clients;
JobResult result; JobResult result;
bool installed:1; bool installed:1;
bool in_run_queue:1; bool in_run_queue:1;
bool matters_to_anchor:1; bool matters_to_anchor:1;
bool override:1; bool override:1;
bool in_dbus_queue:1; bool in_dbus_queue:1;
bool sent_dbus_new_signal:1; bool sent_dbus_new_signal:1;
bool ignore_order:1; bool ignore_order:1;
 End of changes. 1 change blocks. 
3 lines changed or deleted 9 lines changed or added


 journal-def.h   journal-def.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 "sparse-endian.h" #include "sparse-endian.h"
#include <systemd/sd-id128.h> #include "systemd/sd-id128.h"
#include "macro.h" #include "macro.h"
/* /*
* If you change this file you probably should also change its documentatio n: * If you change this file you probably should also change its documentatio n:
* *
* http://www.freedesktop.org/wiki/Software/systemd/journal-files * http://www.freedesktop.org/wiki/Software/systemd/journal-files
* *
*/ */
skipping to change at line 69 skipping to change at line 69
OBJECT_ENTRY, OBJECT_ENTRY,
OBJECT_DATA_HASH_TABLE, OBJECT_DATA_HASH_TABLE,
OBJECT_FIELD_HASH_TABLE, OBJECT_FIELD_HASH_TABLE,
OBJECT_ENTRY_ARRAY, OBJECT_ENTRY_ARRAY,
OBJECT_TAG, OBJECT_TAG,
_OBJECT_TYPE_MAX _OBJECT_TYPE_MAX
}; };
/* Object flags */ /* Object flags */
enum { enum {
OBJECT_COMPRESSED = 1 OBJECT_COMPRESSED_XZ = 1 << 0,
OBJECT_COMPRESSED_LZ4 = 1 << 1,
_OBJECT_COMPRESSED_MAX
}; };
#define OBJECT_COMPRESSION_MASK (OBJECT_COMPRESSED_XZ | OBJECT_COMPRESSED_L
Z4)
struct ObjectHeader { struct ObjectHeader {
uint8_t type; uint8_t type;
uint8_t flags; uint8_t flags;
uint8_t reserved[6]; uint8_t reserved[6];
le64_t size; le64_t size;
uint8_t payload[]; uint8_t payload[];
} _packed_; } _packed_;
struct DataObject { struct DataObject {
ObjectHeader object; ObjectHeader object;
skipping to change at line 158 skipping to change at line 162
enum { enum {
STATE_OFFLINE = 0, STATE_OFFLINE = 0,
STATE_ONLINE = 1, STATE_ONLINE = 1,
STATE_ARCHIVED = 2, STATE_ARCHIVED = 2,
_STATE_MAX _STATE_MAX
}; };
/* Header flags */ /* Header flags */
enum { enum {
HEADER_INCOMPATIBLE_COMPRESSED = 1 HEADER_INCOMPATIBLE_COMPRESSED_XZ = 1 << 0,
HEADER_INCOMPATIBLE_COMPRESSED_LZ4 = 1 << 1,
}; };
#define HEADER_INCOMPATIBLE_ANY (HEADER_INCOMPATIBLE_COMPRESSED_XZ|HEADER_I
NCOMPATIBLE_COMPRESSED_LZ4)
#if defined(HAVE_XZ) && defined(HAVE_LZ4)
# define HEADER_INCOMPATIBLE_SUPPORTED HEADER_INCOMPATIBLE_ANY
#elif defined(HAVE_XZ)
# define HEADER_INCOMPATIBLE_SUPPORTED HEADER_INCOMPATIBLE_COMPRESSED_XZ
#elif defined(HAVE_LZ4)
# define HEADER_INCOMPATIBLE_SUPPORTED HEADER_INCOMPATIBLE_COMPRESSED_LZ4
#else
# define HEADER_INCOMPATIBLE_SUPPORTED 0
#endif
enum { enum {
HEADER_COMPATIBLE_SEALED = 1 HEADER_COMPATIBLE_SEALED = 1
}; };
#define HEADER_COMPATIBLE_ANY HEADER_COMPATIBLE_SEALED
#ifdef HAVE_GCRYPT
# define HEADER_COMPATIBLE_SUPPORTED HEADER_COMPATIBLE_SEALED
#else
# define HEADER_COMPATIBLE_SUPPORTED 0
#endif
#define HEADER_SIGNATURE ((char[]) { 'L', 'P', 'K', 'S', 'H', 'H', 'R', 'H' }) #define HEADER_SIGNATURE ((char[]) { 'L', 'P', 'K', 'S', 'H', 'H', 'R', 'H' })
struct Header { struct Header {
uint8_t signature[8]; /* "LPKSHHRH" */ uint8_t signature[8]; /* "LPKSHHRH" */
le32_t compatible_flags; le32_t compatible_flags;
le32_t incompatible_flags; le32_t incompatible_flags;
uint8_t state; uint8_t state;
uint8_t reserved[7]; uint8_t reserved[7];
sd_id128_t file_id; sd_id128_t file_id;
sd_id128_t machine_id; sd_id128_t machine_id;
 End of changes. 6 change blocks. 
3 lines changed or deleted 29 lines changed or added


 journal-file.h   journal-file.h 
skipping to change at line 30 skipping to change at line 30
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>
#ifdef HAVE_GCRYPT #ifdef HAVE_GCRYPT
#include <gcrypt.h> #include <gcrypt.h>
#endif #endif
#include <systemd/sd-id128.h> #include "systemd/sd-id128.h"
#include "sparse-endian.h" #include "sparse-endian.h"
#include "journal-def.h" #include "journal-def.h"
#include "util.h" #include "util.h"
#include "mmap-cache.h" #include "mmap-cache.h"
#include "hashmap.h" #include "hashmap.h"
typedef struct JournalMetrics { typedef struct JournalMetrics {
uint64_t max_use; uint64_t max_use;
uint64_t use; uint64_t use;
skipping to change at line 59 skipping to change at line 59
} direction_t; } direction_t;
typedef struct JournalFile { typedef struct JournalFile {
int fd; int fd;
mode_t mode; mode_t mode;
int flags; int flags;
int prot; int prot;
bool writable:1; bool writable:1;
bool compress:1; bool compress_xz:1;
bool compress_lz4:1;
bool seal:1; bool seal:1;
bool tail_entry_monotonic_valid:1; bool tail_entry_monotonic_valid:1;
direction_t last_direction; direction_t last_direction;
char *path; char *path;
struct stat last_stat; struct stat last_stat;
Header *header; Header *header;
skipping to change at line 82 skipping to change at line 83
uint64_t current_offset; uint64_t current_offset;
JournalMetrics metrics; JournalMetrics metrics;
MMapCache *mmap; MMapCache *mmap;
Hashmap *chain_cache; Hashmap *chain_cache;
#ifdef HAVE_XZ #ifdef HAVE_XZ
void *compress_buffer; void *compress_buffer;
uint64_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;
uint64_t fss_start_usec; uint64_t fss_start_usec;
skipping to change at line 156 skipping to change at line 157
/* This allows changing the key for 1142 years, every usec. */ /* This allows changing the key for 1142 years, every usec. */
return u < (1ULL << 55); return u < (1ULL << 55);
} }
#define JOURNAL_HEADER_CONTAINS(h, field) \ #define JOURNAL_HEADER_CONTAINS(h, field) \
(le64toh((h)->header_size) >= offsetof(Header, field) + sizeof((h)- >field)) (le64toh((h)->header_size) >= offsetof(Header, field) + sizeof((h)- >field))
#define JOURNAL_HEADER_SEALED(h) \ #define JOURNAL_HEADER_SEALED(h) \
(!!(le32toh((h)->compatible_flags) & HEADER_COMPATIBLE_SEALED)) (!!(le32toh((h)->compatible_flags) & HEADER_COMPATIBLE_SEALED))
#define JOURNAL_HEADER_COMPRESSED(h) \ #define JOURNAL_HEADER_COMPRESSED_XZ(h) \
(!!(le32toh((h)->incompatible_flags) & HEADER_INCOMPATIBLE_COMPRESS (!!(le32toh((h)->incompatible_flags) & HEADER_INCOMPATIBLE_COMPRESS
ED)) ED_XZ))
#define JOURNAL_HEADER_COMPRESSED_LZ4(h) \
(!!(le32toh((h)->incompatible_flags) & HEADER_INCOMPATIBLE_COMPRESS
ED_LZ4))
int journal_file_move_to_object(JournalFile *f, int type, uint64_t offset, Object **ret); int journal_file_move_to_object(JournalFile *f, int type, uint64_t offset, Object **ret);
uint64_t journal_file_entry_n_items(Object *o) _pure_; uint64_t journal_file_entry_n_items(Object *o) _pure_;
uint64_t journal_file_entry_array_n_items(Object *o) _pure_; uint64_t journal_file_entry_array_n_items(Object *o) _pure_;
uint64_t journal_file_hash_table_n_items(Object *o) _pure_; uint64_t journal_file_hash_table_n_items(Object *o) _pure_;
int journal_file_append_object(JournalFile *f, int type, uint64_t size, Obj ect **ret, uint64_t *offset); int journal_file_append_object(JournalFile *f, int type, uint64_t size, Obj ect **ret, uint64_t *offset);
int journal_file_append_entry(JournalFile *f, const dual_timestamp *ts, con st struct iovec iovec[], unsigned n_iovec, uint64_t *seqno, Object **ret, u int64_t *offset); int journal_file_append_entry(JournalFile *f, const dual_timestamp *ts, con st struct iovec iovec[], unsigned n_iovec, uint64_t *seqno, Object **ret, u int64_t *offset);
 End of changes. 4 change blocks. 
6 lines changed or deleted 11 lines changed or added


 journal-internal.h   journal-internal.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/>.
***/ ***/
#include <sys/types.h> #include <sys/types.h>
#include <inttypes.h> #include <inttypes.h>
#include <stdbool.h> #include <stdbool.h>
#include <systemd/sd-id128.h> #include "systemd/sd-id128.h"
#include "journal-def.h" #include "journal-def.h"
#include "list.h" #include "list.h"
#include "hashmap.h" #include "hashmap.h"
#include "set.h" #include "set.h"
#include "journal-file.h" #include "journal-file.h"
typedef struct Match Match; typedef struct Match Match;
typedef struct Location Location; typedef struct Location Location;
typedef struct Directory Directory; typedef struct Directory Directory;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 journal-qrcode.h   journal-qrcode.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/>.
***/ ***/
#include <inttypes.h> #include <inttypes.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdio.h> #include <stdio.h>
#include <systemd/sd-id128.h> #include "systemd/sd-id128.h"
int print_qr_code(FILE *f, const void *seed, size_t seed_size, uint64_t sta rt, uint64_t interval, const char *hn, sd_id128_t machine); int print_qr_code(FILE *f, const void *seed, size_t seed_size, uint64_t sta rt, uint64_t interval, const char *hn, sd_id128_t machine);
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 journal-remote-parse.h   journal-remote-parse.h 
skipping to change at line 36 skipping to change at line 36
typedef enum { typedef enum {
STATE_LINE = 0, /* waiting to read, or reading line */ STATE_LINE = 0, /* waiting to read, or reading line */
STATE_DATA_START, /* reading binary data header */ STATE_DATA_START, /* reading binary data header */
STATE_DATA, /* reading binary data */ STATE_DATA, /* reading binary data */
STATE_DATA_FINISH, /* expecting newline */ STATE_DATA_FINISH, /* expecting newline */
STATE_EOF, /* done */ STATE_EOF, /* done */
} source_state; } source_state;
typedef struct RemoteSource { typedef struct RemoteSource {
char* name; char *name;
int fd; int fd;
bool passive_fd;
char *buf; char *buf;
size_t size; size_t size; /* total size of the buffer */
size_t filled; size_t offset; /* offset to the beginning of live data in the b
size_t data_size; uffer */
size_t scanned; /* number of bytes since the beginning of data w
ithout a newline */
size_t filled; /* total number of bytes in the buffer */
size_t data_size; /* size of the binary data chunk being processed
*/
struct iovec_wrapper iovw; struct iovec_wrapper iovw;
source_state state; source_state state;
dual_timestamp ts; dual_timestamp ts;
Writer *writer;
sd_event_source *event; sd_event_source *event;
} RemoteSource; } RemoteSource;
static inline int source_non_empty(RemoteSource *source) { RemoteSource* source_new(int fd, bool passive_fd, char *name, Writer *write
r);
static inline size_t source_non_empty(RemoteSource *source) {
assert(source); assert(source);
return source->filled > 0; return source->filled;
} }
void source_free(RemoteSource *source); void source_free(RemoteSource *source);
int process_data(RemoteSource *source); int process_data(RemoteSource *source);
int push_data(RemoteSource *source, const char *data, size_t size); int push_data(RemoteSource *source, const char *data, size_t size);
int process_source(RemoteSource *source, Writer *writer, bool compress, boo l seal); int process_source(RemoteSource *source, bool compress, bool seal);
 End of changes. 7 change blocks. 
6 lines changed or deleted 17 lines changed or added


 journal-remote-write.h   journal-remote-write.h 
skipping to change at line 28 skipping to change at line 28
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 <stdlib.h> #include <stdlib.h>
#include "journal-file.h" #include "journal-file.h"
typedef struct RemoteServer RemoteServer;
struct iovec_wrapper { struct iovec_wrapper {
struct iovec *iovec; struct iovec *iovec;
size_t size_bytes; size_t size_bytes;
size_t count; size_t count;
}; };
int iovw_put(struct iovec_wrapper *iovw, void* data, size_t len); int iovw_put(struct iovec_wrapper *iovw, void* data, size_t len);
void iovw_free_contents(struct iovec_wrapper *iovw); void iovw_free_contents(struct iovec_wrapper *iovw);
size_t iovw_size(struct iovec_wrapper *iovw); size_t iovw_size(struct iovec_wrapper *iovw);
void iovw_rebase(struct iovec_wrapper *iovw, char *old, char *new);
typedef struct Writer { typedef struct Writer {
JournalFile *journal; JournalFile *journal;
JournalMetrics metrics; JournalMetrics metrics;
MMapCache *mmap; MMapCache *mmap;
RemoteServer *server;
char *hashmap_key;
uint64_t seqnum; uint64_t seqnum;
int n_ref;
} Writer; } Writer;
int writer_init(Writer *s); Writer* writer_new(RemoteServer* server);
int writer_close(Writer *s); Writer* writer_free(Writer *w);
Writer* writer_ref(Writer *w);
Writer* writer_unref(Writer *w);
DEFINE_TRIVIAL_CLEANUP_FUNC(Writer*, writer_unref);
#define _cleanup_writer_unref_ _cleanup_(writer_unrefp)
int writer_write(Writer *s, int writer_write(Writer *s,
struct iovec_wrapper *iovw, struct iovec_wrapper *iovw,
dual_timestamp *ts, dual_timestamp *ts,
bool compress, bool compress,
bool seal); bool seal);
typedef enum JournalWriteSplitMode {
JOURNAL_WRITE_SPLIT_NONE,
JOURNAL_WRITE_SPLIT_HOST,
_JOURNAL_WRITE_SPLIT_MAX,
_JOURNAL_WRITE_SPLIT_INVALID = -1
} JournalWriteSplitMode;
 End of changes. 7 change blocks. 
2 lines changed or deleted 18 lines changed or added


 journald-native.h   journald-native.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/>.
***/ ***/
#include "journald-server.h" #include "journald-server.h"
/* Make sure not to make this smaller than the maximum coredump /* Make sure not to make this smaller than the maximum coredump
* size. See COREDUMP_MAX in coredump.c */ * size. See COREDUMP_MAX in coredump.c */
#define ENTRY_SIZE_MAX (1024*1024*768) #define ENTRY_SIZE_MAX (1024*1024*770u)
#define DATA_SIZE_MAX (1024*1024*768) #define DATA_SIZE_MAX (1024*1024*768u)
bool valid_user_field(const char *p, size_t l, bool allow_protected); bool valid_user_field(const char *p, size_t l, bool allow_protected);
void server_process_native_message(Server *s, const void *buffer, size_t bu ffer_size, struct ucred *ucred, struct timeval *tv, const char *label, size _t label_len); void server_process_native_message(Server *s, const void *buffer, size_t bu ffer_size, struct ucred *ucred, struct timeval *tv, const char *label, size _t label_len);
void server_process_native_file(Server *s, int fd, struct ucred *ucred, str uct timeval *tv, const char *label, size_t label_len); void server_process_native_file(Server *s, int fd, struct ucred *ucred, str uct timeval *tv, const char *label, size_t label_len);
int server_open_native_socket(Server*s); int server_open_native_socket(Server*s);
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 kdbus.h   kdbus.h 
skipping to change at line 226 skipping to change at line 226
* @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_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_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
* @KDBUS_ITEM_EXE: The path of the executable * @KDBUS_ITEM_EXE: The path of the executable
* @KDBUS_ITEM_CMDLINE: The process command line * @KDBUS_ITEM_CMDLINE: The process command line
* @KDBUS_ITEM_CGROUP: The croup membership * @KDBUS_ITEM_CGROUP: The croup membership
* @KDBUS_ITEM_CAPS: The process capabilities * @KDBUS_ITEM_CAPS: The process capabilities
* @KDBUS_ITEM_SECLABEL: The security label * @KDBUS_ITEM_SECLABEL: The security label
* @KDBUS_ITEM_AUDIT: The audit IDs * @KDBUS_ITEM_AUDIT: The audit IDs
* @KDBUS_ITEM_CONN_NAME: The connection's human-readable name (debugg ing) * @KDBUS_ITEM_CONN_NAME: The connection's human-readable name (debugg ing)
* @_KDBUS_ITEM_POLICY_BASE: Start of policy items * @_KDBUS_ITEM_POLICY_BASE: Start of policy items
skipping to change at line 266 skipping to change at line 267
KDBUS_ITEM_DST_NAME, KDBUS_ITEM_DST_NAME,
KDBUS_ITEM_MAKE_NAME, KDBUS_ITEM_MAKE_NAME,
KDBUS_ITEM_MEMFD_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_PID_COMM, KDBUS_ITEM_PID_COMM,
KDBUS_ITEM_TID_COMM, KDBUS_ITEM_TID_COMM,
KDBUS_ITEM_EXE, KDBUS_ITEM_EXE,
KDBUS_ITEM_CMDLINE, KDBUS_ITEM_CMDLINE,
KDBUS_ITEM_CGROUP, KDBUS_ITEM_CGROUP,
KDBUS_ITEM_CAPS, KDBUS_ITEM_CAPS,
KDBUS_ITEM_SECLABEL, KDBUS_ITEM_SECLABEL,
KDBUS_ITEM_AUDIT, KDBUS_ITEM_AUDIT,
KDBUS_ITEM_CONN_NAME, KDBUS_ITEM_CONN_NAME,
skipping to change at line 484 skipping to change at line 486
}; };
/** /**
* 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 receiving 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 one or multiple names. Th * policy entries for a name. The provided name
e * is not activated and not registered with the
* provided names are not activated, and are no * name database, it only allows unprivileged
t * connections to aquire a name, talk or discov
* registered with the name database er
* 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 = 1 << 0,
KDBUS_HELLO_ACTIVATOR = 1 << 1, KDBUS_HELLO_ACTIVATOR = 1 << 1,
KDBUS_HELLO_POLICY_HOLDER = 1 << 2, KDBUS_HELLO_POLICY_HOLDER = 1 << 2,
KDBUS_HELLO_MONITOR = 1 << 3, KDBUS_HELLO_MONITOR = 1 << 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_NAMES: Well-known names * @KDBUS_ATTACH_NAMES: Well-known names
* @KDBUS_ATTACH_COMM: The "comm" process identifier * @KDBUS_ATTACH_COMM: The "comm" process identifier
* @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 = 1 << 0,
KDBUS_ATTACH_CREDS = 1 << 1, KDBUS_ATTACH_CREDS = 1 << 1,
KDBUS_ATTACH_NAMES = 1 << 2, KDBUS_ATTACH_AUXGROUPS = 1 << 2,
KDBUS_ATTACH_COMM = 1 << 3, KDBUS_ATTACH_NAMES = 1 << 3,
KDBUS_ATTACH_EXE = 1 << 4, KDBUS_ATTACH_COMM = 1 << 4,
KDBUS_ATTACH_CMDLINE = 1 << 5, KDBUS_ATTACH_EXE = 1 << 5,
KDBUS_ATTACH_CGROUP = 1 << 6, KDBUS_ATTACH_CMDLINE = 1 << 6,
KDBUS_ATTACH_CAPS = 1 << 7, KDBUS_ATTACH_CGROUP = 1 << 7,
KDBUS_ATTACH_SECLABEL = 1 << 8, KDBUS_ATTACH_CAPS = 1 << 8,
KDBUS_ATTACH_AUDIT = 1 << 9, KDBUS_ATTACH_SECLABEL = 1 << 9,
KDBUS_ATTACH_CONN_NAME = 1 << 10, KDBUS_ATTACH_AUDIT = 1 << 10,
_KDBUS_ATTACH_ALL = (1 << 11) - 1, KDBUS_ATTACH_CONN_NAME = 1 << 11,
_KDBUS_ATTACH_ALL = (1 << 12) - 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 will * @conn_flags: Connection flags (KDBUS_HELLO_*). The kernel will
* return its capabilities in that field. * return its capabilities in that field.
* @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
skipping to change at line 605 skipping to change at line 611
KDBUS_NAME_ALLOW_REPLACEMENT = 1 << 1, KDBUS_NAME_ALLOW_REPLACEMENT = 1 << 1,
KDBUS_NAME_QUEUE = 1 << 2, KDBUS_NAME_QUEUE = 1 << 2,
KDBUS_NAME_IN_QUEUE = 1 << 3, KDBUS_NAME_IN_QUEUE = 1 << 3,
KDBUS_NAME_ACTIVATOR = 1 << 4, KDBUS_NAME_ACTIVATOR = 1 << 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. For requests, * @owner_id: The current owner of the name.
* privileged users may set this field to
* (de)register names on behalf of other connections.
* @conn_flags: The flags of the owning connection (KDBUS_HE LLO_*) * @conn_flags: The flags of the owning connection (KDBUS_HE LLO_*)
* @name: The well-known name * @name: The well-known 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 owner_id;
__u64 conn_flags; __u64 conn_flags;
skipping to change at line 733 skipping to change at line 737
* This structure is used with the KDBUS_CMD_ADD_MATCH and * This structure is used with the KDBUS_CMD_ADD_MATCH and
* KDBUS_CMD_REMOVE_MATCH ioctl. * KDBUS_CMD_REMOVE_MATCH ioctl.
*/ */
struct kdbus_cmd_match { struct kdbus_cmd_match {
__u64 size; __u64 size;
__u64 cookie; __u64 cookie;
struct kdbus_item items[0]; struct kdbus_item items[0];
} __attribute__((aligned(8))); } __attribute__((aligned(8)));
/** /**
* struct kdbus_cmd_memfd_make - create a kdbus memfd
* @size: The total size of the struct
* @file_size: The initial file size
* @fd: The returned file descriptor number
* @__pad: Padding to ensure proper alignement
* @items: A list of items for additional information
*
* This structure is used with the KDBUS_CMD_MEMFD_NEW ioctl.
*/
struct kdbus_cmd_memfd_make {
__u64 size;
__u64 file_size;
int fd;
__u32 __pad;
struct kdbus_item items[0];
} __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_EP_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
skipping to change at line 800 skipping to change at line 786
* 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 sed * @KDBUS_CMD_EP_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.
* @KDBUS_CMD_MEMFD_NEW: Return a new file descriptor which provides
an
* anonymous shared memory file and which can b
e
* used to pass around larger chunks of data.
* Kdbus memfd files can be sealed, which allow
s
* the receiver to trust the data it has receiv
ed.
* Kdbus memfd files expose only very limited
* operations, they can be mmap()ed, seek()ed,
* (p)read(v)() and (p)write(v)(); most other
* common file operations are not implemented.
* Special caution needs to be taken with
* read(v)()/write(v)() on a shared file; the
* underlying file position is always shared
* between all users of the file and race again
st
* each other, pread(v)()/pwrite(v)() avoid the
se
* issues.
* @KDBUS_CMD_MEMFD_SIZE_GET: Return the size of the underlying file, whic
h
* changes with write().
* @KDBUS_CMD_MEMFD_SIZE_SET: Truncate the underlying file to the specifie
d
* size.
* @KDBUS_CMD_MEMFD_SEAL_GET: Return the state of the file sealing.
* @KDBUS_CMD_MEMFD_SEAL_SET: Seal or break a seal of the file. Only files
* which are not shared with other processes an
d
* which are currently not mapped can be sealed
.
* The current process needs to be the one and
* single owner of the file, the sealing cannot
* be changed as long as the file is shared.
*/ */
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_EP_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,
skipping to change at line 865 skipping to change at line 825
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_EP_UPDATE = _IOW(KDBUS_IOCTL_MAGIC, 0x71, KDBUS_CMD_EP_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),
KDBUS_CMD_MEMFD_NEW = _IOWR(KDBUS_IOCTL_MAGIC, 0xc0,
struct kdbus_cmd_memfd_make),
KDBUS_CMD_MEMFD_SIZE_GET = _IOR(KDBUS_IOCTL_MAGIC, 0xc1, __u64
*),
KDBUS_CMD_MEMFD_SIZE_SET = _IOW(KDBUS_IOCTL_MAGIC, 0xc2, __u64
*),
KDBUS_CMD_MEMFD_SEAL_GET = _IOR(KDBUS_IOCTL_MAGIC, 0xc3, int *)
,
KDBUS_CMD_MEMFD_SEAL_SET = _IO(KDBUS_IOCTL_MAGIC, 0xc4),
}; };
/* /*
* errno - api error codes * errno - api error codes
* @E2BIG: A message contains too many records or items. * @E2BIG: A message contains too many records or items.
* @EADDRINUSE: A well-known bus name is already taken by an other * @EADDRINUSE: A well-known bus name is already taken by an other
* connection. * connection.
* @EADDRNOTAVAIL: A message flagged not to activate a service, address ed * @EADDRNOTAVAIL: A message flagged not to activate a service, address ed
* a service which is not currently running. * a service which is not currently running.
* @EAGAIN: No messages are queued at the moment. * @EAGAIN: No messages are queued at the moment.
skipping to change at line 902 skipping to change at line 855
* @ECONNRESET: A connection is shut down, no further operat ions are * @ECONNRESET: A connection is shut down, no further operat ions are
* possible. * possible.
* @ECOMM: A peer does not accept the file descriptors addresse d * @ECOMM: A peer does not accept the file descriptors addresse d
* to it. * to it.
* @EDESTADDRREQ: The well-known bus name is required but missing. * @EDESTADDRREQ: The well-known bus name is required but missing.
* @EDOM: The size of data does not match the expectations. Us ed * @EDOM: The size of data does not match the expectations. Us ed
* for bloom bit field sizes. * for bloom bit field sizes.
* @EEXIST: A requested domain, bus or endpoint with the same * @EEXIST: A requested domain, bus or endpoint with the same
* name already exists. A specific data type, which is * name already exists. A specific data type, which is
* only expected once, is provided multiple times. * only expected once, is provided multiple times.
* @EFAULT: The supplied memory could not be accessed, or the da * @EFAULT: The supplied memory could not be accessed, the data
ta * is not properly aligned, or the current task's memor
* is not properly aligned. y
* is inaccessible.
* @EINVAL: The provided data does not match its type or other * @EINVAL: The provided data does not match its type or other
* expectations, like a string which is not NUL termina ted, * expectations, like a string which is not NUL termina ted,
* or a string length that points behind the first * or a string length that points behind the first
* \0-byte in the string. * \0-byte in the string.
* @EMEDIUMTYPE: A file descriptor which is not a kdbus memfd was * @EMEDIUMTYPE: A file descriptor which is not a kdbus memfd was
* refused to send as KDBUS_MSG_PAYLOAD_MEMFD. * refused to send as KDBUS_MSG_PAYLOAD_MEMFD.
* @EMFILE: Too many file descriptors have been supplied with a * @EMFILE: Too many file descriptors have been supplied with a
* message. * message.
* Too many connections or buses are created for a give n * Too many connections or buses are created for a give n
* user. * user.
 End of changes. 10 change blocks. 
85 lines changed or deleted 25 lines changed or added


 libudev-private.h   libudev-private.h 
skipping to change at line 23 skipping to change at line 23
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/>.
***/ ***/
#ifndef _LIBUDEV_PRIVATE_H_ #ifndef _LIBUDEV_PRIVATE_H_
#define _LIBUDEV_PRIVATE_H_ #define _LIBUDEV_PRIVATE_H_
#include <syslog.h>
#include <signal.h> #include <signal.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
#include "libudev.h" #include "libudev.h"
#include "macro.h" #include "macro.h"
#include "util.h" #include "util.h"
#include "mkdir.h" #include "mkdir.h"
#include "strxcpyx.h" #include "strxcpyx.h"
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 link-config.h   link-config.h 
skipping to change at line 42 skipping to change at line 42
typedef struct link_config link_config; typedef struct link_config link_config;
typedef enum MACPolicy { typedef enum MACPolicy {
MACPOLICY_PERSISTENT, MACPOLICY_PERSISTENT,
MACPOLICY_RANDOM, MACPOLICY_RANDOM,
_MACPOLICY_MAX, _MACPOLICY_MAX,
_MACPOLICY_INVALID = -1 _MACPOLICY_INVALID = -1
} MACPolicy; } MACPolicy;
typedef enum NamePolicy { typedef enum NamePolicy {
NAMEPOLICY_KERNEL,
NAMEPOLICY_DATABASE, NAMEPOLICY_DATABASE,
NAMEPOLICY_ONBOARD, NAMEPOLICY_ONBOARD,
NAMEPOLICY_SLOT, NAMEPOLICY_SLOT,
NAMEPOLICY_PATH, NAMEPOLICY_PATH,
NAMEPOLICY_MAC, NAMEPOLICY_MAC,
_NAMEPOLICY_MAX, _NAMEPOLICY_MAX,
_NAMEPOLICY_INVALID = -1 _NAMEPOLICY_INVALID = -1
} NamePolicy; } NamePolicy;
struct link_config { struct link_config {
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 log.h   log.h 
skipping to change at line 175 skipping to change at line 175
#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_;
LogTarget log_target_from_string(const char *s) _pure_; LogTarget log_target_from_string(const char *s) _pure_;
#define MESSAGE_ID(x) "MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VA L(x) #define MESSAGE_ID(x) "MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VA L(x)
void log_received_signal(int level, const struct signalfd_siginfo *si); void log_received_signal(int level, const struct signalfd_siginfo *si);
void log_set_upgrade_syslog_to_journal(bool b);
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added


 logind-session.h   logind-session.h 
skipping to change at line 59 skipping to change at line 59
_SESSION_CLASS_MAX, _SESSION_CLASS_MAX,
_SESSION_CLASS_INVALID = -1 _SESSION_CLASS_INVALID = -1
} SessionClass; } SessionClass;
typedef enum SessionType { typedef enum SessionType {
SESSION_UNSPECIFIED, SESSION_UNSPECIFIED,
SESSION_TTY, SESSION_TTY,
SESSION_X11, SESSION_X11,
SESSION_WAYLAND, SESSION_WAYLAND,
SESSION_MIR, SESSION_MIR,
SESSION_WEB,
_SESSION_TYPE_MAX, _SESSION_TYPE_MAX,
_SESSION_TYPE_INVALID = -1 _SESSION_TYPE_INVALID = -1
} SessionType; } SessionType;
#define SESSION_TYPE_IS_GRAPHICAL(type) IN_SET(type, SESSION_X11, SESSION_W AYLAND, SESSION_MIR) #define SESSION_TYPE_IS_GRAPHICAL(type) IN_SET(type, SESSION_X11, SESSION_W AYLAND, SESSION_MIR)
enum KillWho { enum KillWho {
KILL_LEADER, KILL_LEADER,
KILL_ALL, KILL_ALL,
_KILL_WHO_MAX, _KILL_WHO_MAX,
_KILL_WHO_INVALID = -1 _KILL_WHO_INVALID = -1
}; };
struct Session { struct Session {
Manager *manager; Manager *manager;
char *id; const char *id;
unsigned int pos; unsigned int pos;
SessionType type; SessionType type;
SessionClass class; SessionClass class;
char *state_file; char *state_file;
User *user; User *user;
dual_timestamp timestamp; dual_timestamp timestamp;
skipping to change at line 101 skipping to change at line 102
char *remote_host; char *remote_host;
char *service; char *service;
char *desktop; char *desktop;
char *scope; char *scope;
char *scope_job; char *scope_job;
Seat *seat; Seat *seat;
unsigned int vtnr; unsigned int vtnr;
int vtfd; int vtfd;
sd_event_source *vt_source;
pid_t leader; pid_t leader;
uint32_t audit_id; uint32_t audit_id;
int fifo_fd; int fifo_fd;
char *fifo_path; char *fifo_path;
sd_event_source *fifo_event_source; sd_event_source *fifo_event_source;
bool idle_hint; bool idle_hint;
skipping to change at line 175 skipping to change at line 175
const char* session_type_to_string(SessionType t) _const_; const char* session_type_to_string(SessionType t) _const_;
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_;
void session_prepare_vt(Session *s); int session_prepare_vt(Session *s);
void session_restore_vt(Session *s); void session_restore_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. 4 change blocks. 
3 lines changed or deleted 3 lines changed or added


 logs-show.h   logs-show.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/>.
***/ ***/
#include <stdbool.h> #include <stdbool.h>
#include <unistd.h> #include <unistd.h>
#include <sys/types.h> #include <sys/types.h>
#include <systemd/sd-journal.h> #include "systemd/sd-journal.h"
#include "util.h" #include "util.h"
#include "output-mode.h" #include "output-mode.h"
int output_journal( int output_journal(
FILE *f, FILE *f,
sd_journal *j, sd_journal *j,
OutputMode mode, OutputMode mode,
unsigned n_columns, unsigned n_columns,
OutputFlags flags, OutputFlags flags,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 machine.h   machine.h 
skipping to change at line 79 skipping to change at line 79
pid_t leader; pid_t leader;
dual_timestamp timestamp; dual_timestamp timestamp;
bool in_gc_queue:1; bool in_gc_queue:1;
bool started:1; bool started:1;
bool registered:1; bool registered:1;
sd_bus_message *create_message; sd_bus_message *create_message;
int *netif;
unsigned n_netif;
LIST_FIELDS(Machine, gc_queue); LIST_FIELDS(Machine, gc_queue);
}; };
Machine* machine_new(Manager *manager, const char *name); Machine* machine_new(Manager *manager, const char *name);
void machine_free(Machine *m); void machine_free(Machine *m);
bool machine_check_gc(Machine *m, bool drop_not_started); bool machine_check_gc(Machine *m, bool drop_not_started);
void machine_add_to_gc_queue(Machine *m); void machine_add_to_gc_queue(Machine *m);
int machine_start(Machine *m, sd_bus_message *properties, sd_bus_error *err or); int machine_start(Machine *m, sd_bus_message *properties, sd_bus_error *err or);
int machine_stop(Machine *m); int machine_stop(Machine *m);
int machine_save(Machine *m); int machine_save(Machine *m);
 End of changes. 1 change blocks. 
0 lines changed or deleted 3 lines changed or added


 macro.h   macro.h 
skipping to change at line 136 skipping to change at line 136
* @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) \
__extension__ ({ \ __extension__ ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr) ; \ const typeof( ((type *)0)->member ) *__mptr = (ptr) ; \
(type *)( (char *)__mptr - offsetof(type,member) ); \ (type *)( (char *)__mptr - offsetof(type,member) ); \
}) })
#undef MAX #undef MAX
#define MAX(a,b) \ #define MAX(a,b) \
__extension__ ({ \ __extension__ ({ \
typeof(a) _a = (a); \ const typeof(a) _a = (a); \
typeof(b) _b = (b); \ const typeof(b) _b = (b); \
_a > _b ? _a : _b; \ _a > _b ? _a : _b; \
}) })
#define MAX3(x,y,z) \ /* evaluates to (void) if _A or _B are not constant or of different types *
__extension__ ({ \ /
typeof(x) _c = MAX(x,y); \ #define CONST_MAX(_A, _B) \
MAX(_c, z); \ __extension__ (__builtin_choose_expr( \
__builtin_constant_p(_A) && \
__builtin_constant_p(_B) && \
__builtin_types_compatible_p(typeof(_A), typeof(_B)), \
((_A) > (_B)) ? (_A) : (_B), \
(void)0))
#define MAX3(x,y,z) \
__extension__ ({ \
const typeof(x) _c = MAX(x,y); \
MAX(_c, z); \
}) })
#undef MIN #undef MIN
#define MIN(a,b) \ #define MIN(a,b) \
__extension__ ({ \ __extension__ ({ \
typeof(a) _a = (a); \ const typeof(a) _a = (a); \
typeof(b) _b = (b); \ const typeof(b) _b = (b); \
_a < _b ? _a : _b; \ _a < _b ? _a : _b; \
}) })
#define LESS_BY(A,B) \ #define MIN3(x,y,z) \
__extension__ ({ \ __extension__ ({ \
typeof(A) _A = (A); \ const typeof(x) _c = MIN(x,y); \
typeof(B) _B = (B); \ MIN(_c, z); \
_A > _B ? _A - _B : 0; \ })
#define LESS_BY(A,B) \
__extension__ ({ \
const typeof(A) _A = (A); \
const typeof(B) _B = (B); \
_A > _B ? _A - _B : 0; \
}) })
#ifndef CLAMP #ifndef CLAMP
#define CLAMP(x, low, high) \ #define CLAMP(x, low, high) \
__extension__ ({ \ __extension__ ({ \
typeof(x) _x = (x); \ const typeof(x) _x = (x); \
typeof(low) _low = (low); \ const typeof(low) _low = (low); \
typeof(high) _high = (high); \ const typeof(high) _high = (high); \
((_x > _high) ? _high : ((_x < _low) ? _low : _x)); \ ((_x > _high) ? _high : ((_x < _low) ? _low : _x)); \
}) })
#endif #endif
#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) \
skipping to change at line 238 skipping to change at line 253
#define PTR_TO_INT32(p) ((int32_t) ((intptr_t) (p))) #define PTR_TO_INT32(p) ((int32_t) ((intptr_t) (p)))
#define INT32_TO_PTR(u) ((void *) ((intptr_t) (u))) #define INT32_TO_PTR(u) ((void *) ((intptr_t) (u)))
#define PTR_TO_UINT32(p) ((uint32_t) ((uintptr_t) (p))) #define PTR_TO_UINT32(p) ((uint32_t) ((uintptr_t) (p)))
#define UINT32_TO_PTR(u) ((void *) ((uintptr_t) (u))) #define UINT32_TO_PTR(u) ((void *) ((uintptr_t) (u)))
#define PTR_TO_INT64(p) ((int64_t) ((intptr_t) (p))) #define PTR_TO_INT64(p) ((int64_t) ((intptr_t) (p)))
#define INT64_TO_PTR(u) ((void *) ((intptr_t) (u))) #define INT64_TO_PTR(u) ((void *) ((intptr_t) (u)))
#define PTR_TO_UINT64(p) ((uint64_t) ((uintptr_t) (p))) #define PTR_TO_UINT64(p) ((uint64_t) ((uintptr_t) (p)))
#define UINT64_TO_PTR(u) ((void *) ((uintptr_t) (u))) #define UINT64_TO_PTR(u) ((void *) ((uintptr_t) (u)))
#define PTR_TO_SIZE(p) ((size_t) ((uintptr_t) (p)))
#define SIZE_TO_PTR(u) ((void *) ((uintptr_t) (u)))
#define memzero(x,l) (memset((x), 0, (l))) #define memzero(x,l) (memset((x), 0, (l)))
#define zero(x) (memzero(&(x), sizeof(x))) #define zero(x) (memzero(&(x), sizeof(x)))
#define CHAR_TO_STR(x) ((char[2]) { x, 0 }) #define CHAR_TO_STR(x) ((char[2]) { x, 0 })
#define char_array_0(x) x[sizeof(x)-1] = 0; #define char_array_0(x) x[sizeof(x)-1] = 0;
#define IOVEC_SET_STRING(i, s) \ #define IOVEC_SET_STRING(i, s) \
do { \ do { \
struct iovec *_i = &(i); \ struct iovec *_i = &(i); \
 End of changes. 4 change blocks. 
26 lines changed or deleted 45 lines changed or added


 manager.h   manager.h 
skipping to change at line 231 skipping to change at line 231
int pin_cgroupfs_fd; int pin_cgroupfs_fd;
/* Flags */ /* Flags */
SystemdRunningAs running_as; SystemdRunningAs running_as;
ManagerExitCode exit_code:5; ManagerExitCode exit_code:5;
bool dispatching_load_queue:1; bool dispatching_load_queue:1;
bool dispatching_dbus_queue:1; bool dispatching_dbus_queue:1;
bool taint_usr:1; bool taint_usr:1;
bool first_boot:1;
bool test_run:1;
ShowStatus show_status; ShowStatus show_status;
bool confirm_spawn; bool confirm_spawn;
bool no_console_output; bool no_console_output;
ExecOutput default_std_output, default_std_error; ExecOutput default_std_output, default_std_error;
usec_t default_restart_usec, default_timeout_start_usec, default_ti meout_stop_usec; usec_t default_restart_usec, default_timeout_start_usec, default_ti meout_stop_usec;
usec_t default_start_limit_interval; usec_t default_start_limit_interval;
skipping to change at line 276 skipping to change at line 279
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. */
Hashmap *units_requiring_mounts_for; Hashmap *units_requiring_mounts_for;
/* Reference to the kdbus bus control fd */ /* Reference to the kdbus bus control fd */
int kdbus_fd; int kdbus_fd;
/* Used for processing polkit authorization responses */
Hashmap *polkit_registry;
}; };
int manager_new(SystemdRunningAs running_as, Manager **m); int manager_new(SystemdRunningAs running_as, bool test_run, Manager **m);
void manager_free(Manager *m); void manager_free(Manager *m);
int manager_enumerate(Manager *m); int manager_enumerate(Manager *m);
int manager_startup(Manager *m, FILE *serialization, FDSet *fds); int manager_startup(Manager *m, FILE *serialization, FDSet *fds);
Job *manager_get_job(Manager *m, uint32_t id); Job *manager_get_job(Manager *m, uint32_t id);
Unit *manager_get_unit(Manager *m, const char *name); Unit *manager_get_unit(Manager *m, const char *name);
int manager_get_unit_by_path(Manager *m, const char *path, const char *suff ix, Unit **_found); int manager_get_unit_by_path(Manager *m, const char *path, const char *suff ix, Unit **_found);
skipping to change at line 336 skipping to change at line 342
bool manager_unit_inactive_or_pending(Manager *m, const char *name); bool manager_unit_inactive_or_pending(Manager *m, const char *name);
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_status_printf(Manager *m, bool ephemeral, const char *status, const char *format, ...) _printf_(4,5); void manager_status_printf(Manager *m, bool ephemeral, 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_;
 End of changes. 4 change blocks. 
1 lines changed or deleted 9 lines changed or added


 microhttpd-util.h   microhttpd-util.h 
skipping to change at line 44 skipping to change at line 44
int mhd_respondf(struct MHD_Connection *connection, int mhd_respondf(struct MHD_Connection *connection,
unsigned code, unsigned code,
const char *format, ...) _printf_(3,4); const char *format, ...) _printf_(3,4);
int mhd_respond(struct MHD_Connection *connection, int mhd_respond(struct MHD_Connection *connection,
unsigned code, unsigned code,
const char *message); const char *message);
int mhd_respond_oom(struct MHD_Connection *connection); int mhd_respond_oom(struct MHD_Connection *connection);
int check_permissions(struct MHD_Connection *connection, int *code); int check_permissions(struct MHD_Connection *connection, int *code, char ** hostname);
#ifdef HAVE_GNUTLS #ifdef HAVE_GNUTLS
void log_func_gnutls(int level, const char *message); void log_func_gnutls(int level, const char *message);
int log_enable_gnutls_category(const char *cat);
void log_reset_gnutls_level(void);
/* This is additionally filtered by our internal log level, so it /* This is additionally filtered by our internal log level, so it
* should be set fairly high to capture all potentially interesting * should be set fairly high to capture all potentially interesting
* events without overwhelming detail. * events without overwhelming detail.
*/ */
#define GNUTLS_LOG_LEVEL 6
#endif #endif
 End of changes. 3 change blocks. 
2 lines changed or deleted 3 lines changed or added


 missing.h   missing.h 
skipping to change at line 67 skipping to change at line 67
#endif #endif
#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
#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
#endif
#ifndef F_GET_SEALS
#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 */
#endif
#ifndef F_SEAL_SHRINK
#define F_SEAL_SHRINK 0x0002 /* prevent file from shrinking */
#endif
#ifndef F_SEAL_GROW
#define F_SEAL_GROW 0x0004 /* prevent file from growing */
#endif
#ifndef F_SEAL_WRITE
#define F_SEAL_WRITE 0x0008 /* prevent writes */
#endif
#ifndef MFD_ALLOW_SEALING
#define MFD_ALLOW_SEALING 0x0002ULL
#endif
#ifndef IP_FREEBIND #ifndef IP_FREEBIND
#define IP_FREEBIND 15 #define IP_FREEBIND 15
#endif #endif
#ifndef OOM_SCORE_ADJ_MIN #ifndef OOM_SCORE_ADJ_MIN
#define OOM_SCORE_ADJ_MIN (-1000) #define OOM_SCORE_ADJ_MIN (-1000)
#endif #endif
#ifndef OOM_SCORE_ADJ_MAX #ifndef OOM_SCORE_ADJ_MAX
#define OOM_SCORE_ADJ_MAX 1000 #define OOM_SCORE_ADJ_MAX 1000
skipping to change at line 112 skipping to change at line 140
} }
#endif #endif
#ifdef __x86_64__ #ifdef __x86_64__
# ifndef __NR_fanotify_init # ifndef __NR_fanotify_init
# define __NR_fanotify_init 300 # define __NR_fanotify_init 300
# endif # endif
# ifndef __NR_fanotify_mark # ifndef __NR_fanotify_mark
# define __NR_fanotify_mark 301 # define __NR_fanotify_mark 301
# endif # endif
# ifndef __NR_memfd_create
# define __NR_memfd_create 319
# endif
#elif defined __arm__
# ifndef __NR_memfd_create
# define __NR_memfd_create 385
# endif
#elif defined _MIPS_SIM #elif defined _MIPS_SIM
# if _MIPS_SIM == _MIPS_SIM_ABI32 # if _MIPS_SIM == _MIPS_SIM_ABI32
# ifndef __NR_fanotify_init # ifndef __NR_fanotify_init
# define __NR_fanotify_init 4336 # define __NR_fanotify_init 4336
# endif # endif
# ifndef __NR_fanotify_mark # ifndef __NR_fanotify_mark
# define __NR_fanotify_mark 4337 # define __NR_fanotify_mark 4337
# endif # endif
# elif _MIPS_SIM == _MIPS_SIM_NABI32 # elif _MIPS_SIM == _MIPS_SIM_NABI32
# ifndef __NR_fanotify_init # ifndef __NR_fanotify_init
skipping to change at line 142 skipping to change at line 177
# define __NR_fanotify_mark 5296 # define __NR_fanotify_mark 5296
# endif # endif
# endif # endif
#else #else
# ifndef __NR_fanotify_init # ifndef __NR_fanotify_init
# define __NR_fanotify_init 338 # define __NR_fanotify_init 338
# endif # endif
# ifndef __NR_fanotify_mark # ifndef __NR_fanotify_mark
# define __NR_fanotify_mark 339 # define __NR_fanotify_mark 339
# endif # endif
# ifndef __NR_memfd_create
# define __NR_memfd_create 356
# endif
#endif #endif
#ifndef HAVE_FANOTIFY_INIT #ifndef HAVE_FANOTIFY_INIT
static inline int fanotify_init(unsigned int flags, unsigned int event_f_fl ags) { static inline int fanotify_init(unsigned int flags, unsigned int event_f_fl ags) {
return syscall(__NR_fanotify_init, flags, event_f_flags); return syscall(__NR_fanotify_init, flags, event_f_flags);
} }
#endif #endif
#ifndef HAVE_FANOTIFY_MARK #ifndef HAVE_FANOTIFY_MARK
static inline int fanotify_mark(int fanotify_fd, unsigned int flags, uint64 _t mask, static inline int fanotify_mark(int fanotify_fd, unsigned int flags, uint64 _t mask,
skipping to change at line 169 skipping to change at line 207
_mask._64 = mask; _mask._64 = mask;
return syscall(__NR_fanotify_mark, fanotify_fd, flags, return syscall(__NR_fanotify_mark, fanotify_fd, flags,
_mask._32[0], _mask._32[1], dfd, pathname); _mask._32[0], _mask._32[1], dfd, pathname);
#else #else
return syscall(__NR_fanotify_mark, fanotify_fd, flags, mask, dfd, p athname); return syscall(__NR_fanotify_mark, fanotify_fd, flags, mask, dfd, p athname);
#endif #endif
} }
#endif #endif
#ifndef HAVE_MEMFD_CREATE
static inline int memfd_create(const char *name, uint64_t flags) {
return syscall(__NR_memfd_create, name, flags);
}
#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
#endif #endif
#ifndef BTRFS_DEVICE_PATH_NAME_MAX #ifndef BTRFS_DEVICE_PATH_NAME_MAX
#define BTRFS_DEVICE_PATH_NAME_MAX 1024 #define BTRFS_DEVICE_PATH_NAME_MAX 1024
skipping to change at line 213 skipping to change at line 257
struct btrfs_ioctl_fs_info_args { struct btrfs_ioctl_fs_info_args {
uint64_t max_id; /* out */ uint64_t max_id; /* out */
uint64_t num_devices; /* out */ uint64_t num_devices; /* out */
uint8_t fsid[BTRFS_FSID_SIZE]; /* out */ uint8_t fsid[BTRFS_FSID_SIZE]; /* out */
uint64_t reserved[124]; /* pad to 1k */ uint64_t reserved[124]; /* pad to 1k */
}; };
#endif #endif
#ifndef BTRFS_IOC_DEFRAG #ifndef BTRFS_IOC_DEFRAG
#define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, struct btrfs_ioctl_vol_ #define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \
args) struct btrfs_ioctl_vol_args)
#endif #endif
#ifndef BTRFS_IOC_DEV_INFO #ifndef BTRFS_IOC_DEV_INFO
#define BTRFS_IOC_DEV_INFO _IOWR(BTRFS_IOCTL_MAGIC, 30, \ #define BTRFS_IOC_DEV_INFO _IOWR(BTRFS_IOCTL_MAGIC, 30, \
struct btrfs_ioctl_dev_info_args) struct btrfs_ioctl_dev_info_args)
#endif #endif
#ifndef BTRFS_IOC_FS_INFO #ifndef BTRFS_IOC_FS_INFO
#define BTRFS_IOC_FS_INFO _IOR(BTRFS_IOCTL_MAGIC, 31, \ #define BTRFS_IOC_FS_INFO _IOR(BTRFS_IOCTL_MAGIC, 31, \
struct btrfs_ioctl_fs_info_args) struct btrfs_ioctl_fs_info_args)
#endif
#ifndef BTRFS_IOC_DEVICES_READY
#define BTRFS_IOC_DEVICES_READY _IOR(BTRFS_IOCTL_MAGIC, 39, \
struct btrfs_ioctl_vol_args)
#endif #endif
#ifndef BTRFS_SUPER_MAGIC #ifndef BTRFS_SUPER_MAGIC
#define BTRFS_SUPER_MAGIC 0x9123683E #define BTRFS_SUPER_MAGIC 0x9123683E
#endif #endif
#ifndef MS_MOVE #ifndef MS_MOVE
#define MS_MOVE 8192 #define MS_MOVE 8192
#endif #endif
skipping to change at line 374 skipping to change at line 424
#endif #endif
#ifndef LOOP_CTL_REMOVE #ifndef LOOP_CTL_REMOVE
#define LOOP_CTL_REMOVE 0x4C81 #define LOOP_CTL_REMOVE 0x4C81
#endif #endif
#ifndef LOOP_CTL_GET_FREE #ifndef LOOP_CTL_GET_FREE
#define LOOP_CTL_GET_FREE 0x4C82 #define LOOP_CTL_GET_FREE 0x4C82
#endif #endif
#if !HAVE_DECL_IFLA_MACVLAN_FLAGS
#define IFLA_MACVLAN_UNSPEC 0
#define IFLA_MACVLAN_MODE 1
#define IFLA_MACVLAN_FLAGS 2
#define __IFLA_MACVLAN_MAX 3
#define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1)
#endif
#if !HAVE_DECL_IFLA_VTI_REMOTE
#define IFLA_VTI_UNSPEC 0
#define IFLA_VTI_LINK 1
#define IFLA_VTI_IKEY 2
#define IFLA_VTI_OKEY 3
#define IFLA_VTI_LOCAL 4
#define IFLA_VTI_REMOTE 5
#define __IFLA_VTI_MAX 6
#define IFLA_VTI_MAX (__IFLA_VTI_MAX - 1)
#endif
#if !HAVE_DECL_IFLA_PHYS_PORT_ID #if !HAVE_DECL_IFLA_PHYS_PORT_ID
#undef IFLA_PROMISCUITY #undef IFLA_PROMISCUITY
#define IFLA_PROMISCUITY 30 #define IFLA_PROMISCUITY 30
#define IFLA_NUM_TX_QUEUES 31 #define IFLA_NUM_TX_QUEUES 31
#define IFLA_NUM_RX_QUEUES 32 #define IFLA_NUM_RX_QUEUES 32
#define IFLA_CARRIER 33 #define IFLA_CARRIER 33
#define IFLA_PHYS_PORT_ID 34 #define IFLA_PHYS_PORT_ID 34
#define __IFLA_MAX 35 #define __IFLA_MAX 35
#define IFLA_MAX (__IFLA_MAX - 1) #define IFLA_MAX (__IFLA_MAX - 1)
skipping to change at line 481 skipping to change at line 552
#endif #endif
#if !HAVE_DECL_IFLA_BRIDGE_VLAN_INFO #if !HAVE_DECL_IFLA_BRIDGE_VLAN_INFO
#define IFLA_BRIDGE_FLAGS 0 #define IFLA_BRIDGE_FLAGS 0
#define IFLA_BRIDGE_MODE 1 #define IFLA_BRIDGE_MODE 1
#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
#define IPV6_UNICAST_IF 76
#endif
#ifndef IFF_LOWER_UP
#define IFF_LOWER_UP 0x10000
#endif
#ifndef IFF_DORMANT
#define IFF_DORMANT 0x20000
#endif
#ifndef BOND_XMIT_POLICY_ENCAP23
#define BOND_XMIT_POLICY_ENCAP23 3
#endif
#ifndef BOND_XMIT_POLICY_ENCAP34
#define BOND_XMIT_POLICY_ENCAP34 4
#endif
#ifndef NET_ADDR_RANDOM
# define NET_ADDR_RANDOM 1
#endif
#ifndef NET_NAME_ENUM
# define NET_NAME_ENUM 1
#endif
#ifndef NET_NAME_PREDICTABLE
# define NET_NAME_PREDICTABLE 2
#endif
#ifndef NET_NAME_USER
# define NET_NAME_USER 3
#endif
#ifndef NET_NAME_RENAMED
# define NET_NAME_RENAMED 4
#endif
 End of changes. 8 change blocks. 
3 lines changed or deleted 73 lines changed or added


 mkdir.h   mkdir.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 <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); int mkdir_p_prefix(const char *prefix, const char *path, mode_t mode);
/* selinux versions */ /* selinux versions */
int mkdir_label(const char *path, mode_t mode); 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);
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 network-internal.h   network-internal.h 
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
#pragma once
/*** /***
This file is part of systemd. This file is part of systemd.
Copyright (C) 2013 Tom Gundersen <teg@jklm.no> Copyright (C) 2013 Tom Gundersen <teg@jklm.no>
systemd is free software; you can redistribute it and/or modify it systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version. (at your option) any later version.
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/>.
***/ ***/
#pragma once
#include <netinet/ether.h> #include <netinet/ether.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <stdbool.h> #include <stdbool.h>
#include "udev.h" #include "udev.h"
#include "condition-util.h" #include "condition-util.h"
bool net_match_config(const struct ether_addr *match_mac, bool net_match_config(const struct ether_addr *match_mac,
const char *match_path, const char *match_path,
const char *match_driver, const char *match_driver,
skipping to change at line 47 skipping to change at line 47
Condition *match_virt, Condition *match_virt,
Condition *match_kernel, Condition *match_kernel,
Condition *match_arch, Condition *match_arch,
const struct ether_addr *dev_mac, const struct ether_addr *dev_mac,
const char *dev_path, const char *dev_path,
const char *dev_parent_driver, const char *dev_parent_driver,
const char *dev_driver, const char *dev_driver,
const char *dev_type, const char *dev_type,
const char *dev_name); const char *dev_name);
unsigned net_netmask_to_prefixlen(const struct in_addr *netmask);
int config_parse_net_condition(const char *unit, const char *filename, unsi gned line, int config_parse_net_condition(const char *unit, const char *filename, unsi gned line,
const char *section, unsigned section_line, const char *lvalue, const char *section, unsigned section_line, const char *lvalue,
int ltype, const char *rvalue, void *data, v oid *userdata); int ltype, const char *rvalue, void *data, v oid *userdata);
int config_parse_hwaddr(const char *unit, const char *filename, unsigned li ne, int config_parse_hwaddr(const char *unit, const char *filename, unsigned li ne,
const char *section, unsigned section_line, const c har *lvalue, const char *section, unsigned section_line, const c har *lvalue,
int ltype, const char *rvalue, void *data, void *us erdata); int ltype, const char *rvalue, void *data, void *us erdata);
int config_parse_ifname(const char *unit, const char *filename, unsigned li ne, int config_parse_ifname(const char *unit, const char *filename, unsigned li ne,
const char *section, unsigned section_line, const c har *lvalue, const char *section, unsigned section_line, const c har *lvalue,
int ltype, const char *rvalue, void *data, void *us erdata); int ltype, const char *rvalue, void *data, void *us erdata);
int config_parse_ifalias(const char *unit, const char *filename, unsigned l ine, int config_parse_ifalias(const char *unit, const char *filename, unsigned l ine,
const char *section, unsigned section_line, const char *lvalue, const char *section, unsigned section_line, const char *lvalue,
int ltype, const char *rvalue, void *data, void *u serdata); int ltype, const char *rvalue, void *data, void *u serdata);
int net_parse_inaddr(const char *address, unsigned char *family, void *dst)
;
int net_get_unique_predictable_data(struct udev_device *device, uint8_t res ult[8]); int net_get_unique_predictable_data(struct udev_device *device, uint8_t res ult[8]);
const char *net_get_name(struct udev_device *device); const char *net_get_name(struct udev_device *device);
void serialize_in_addrs(FILE *f, const char *key, struct in_addr *addresses void serialize_in_addrs(FILE *f, const struct in_addr *addresses, size_t si
, size_t size); ze);
int deserialize_in_addrs(struct in_addr **addresses, size_t *size, const ch int deserialize_in_addrs(struct in_addr **addresses, const char *string);
ar *string); int deserialize_in6_addrs(struct in6_addr **addresses, const char *string);
int deserialize_in6_addrs(struct in6_addr **addresses, size_t *size, const
char *string);
/* don't include "dhcp-lease-internal.h" as it causes conflicts between net inet/ip.h and linux/ip.h */ /* don't include "dhcp-lease-internal.h" as it causes conflicts between net inet/ip.h and linux/ip.h */
struct sd_dhcp_route; struct sd_dhcp_route;
void serialize_dhcp_routes(FILE *f, const char *key, struct sd_dhcp_route * routes, size_t size); void serialize_dhcp_routes(FILE *f, const char *key, struct sd_dhcp_route * routes, size_t size);
int deserialize_dhcp_routes(struct sd_dhcp_route **ret, size_t *ret_size, s ize_t *ret_allocated, const char *string); int deserialize_dhcp_routes(struct sd_dhcp_route **ret, size_t *ret_size, s ize_t *ret_allocated, const char *string);
 End of changes. 5 change blocks. 
13 lines changed or deleted 6 lines changed or added


 network-util.h   network-util.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/>.
***/ ***/
#include "util.h" #include "util.h"
#include "sd-network.h" #include "sd-network.h"
DEFINE_TRIVIAL_CLEANUP_FUNC(sd_network_monitor*, sd_network_monitor_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(sd_network_monitor*, sd_network_monitor_unref);
#define _cleanup_network_monitor_unref_ _cleanup_(sd_network_monitor_unrefp ) #define _cleanup_network_monitor_unref_ _cleanup_(sd_network_monitor_unrefp )
bool network_is_online(void);
 End of changes. 2 change blocks. 
1 lines changed or deleted 0 lines changed or added


 networkd-wait-online.h   networkd-wait-online.h 
skipping to change at line 26 skipping to change at line 26
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/>.
***/ ***/
#pragma once #pragma once
#include "sd-event.h" #include "sd-event.h"
#include "sd-rtnl.h" #include "sd-rtnl.h"
#include "sd-network.h"
#include "util.h" #include "util.h"
#include "hashmap.h"
typedef struct Manager { typedef struct Manager {
sd_event *event; Hashmap *links;
Hashmap *links_by_name;
char **interfaces;
sd_rtnl *rtnl; sd_rtnl *rtnl;
sd_network_monitor *monitor; sd_event_source *rtnl_event_source;
sd_network_monitor *network_monitor;
sd_event_source *network_monitor_event_source;
sd_event *event;
} Manager; } Manager;
void manager_free(Manager *m); void manager_free(Manager *m);
int manager_new(Manager **ret, char **interfaces);
DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free); DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free);
#define _cleanup_manager_free_ _cleanup_(manager_freep)
bool manager_all_configured(Manager *m);
 End of changes. 6 change blocks. 
2 lines changed or deleted 14 lines changed or added


 networkd.h   networkd.h 
skipping to change at line 41 skipping to change at line 41
#include "sd-ipv4ll.h" #include "sd-ipv4ll.h"
#include "sd-icmp6-nd.h" #include "sd-icmp6-nd.h"
#include "sd-dhcp6-client.h" #include "sd-dhcp6-client.h"
#include "udev.h" #include "udev.h"
#include "rtnl-util.h" #include "rtnl-util.h"
#include "hashmap.h" #include "hashmap.h"
#include "list.h" #include "list.h"
#include "set.h" #include "set.h"
#include "condition-util.h" #include "condition-util.h"
#include "socket-util.h" #include "in-addr-util.h"
#define CACHE_INFO_INFINITY_LIFE_TIME 0xFFFFFFFFU #define CACHE_INFO_INFINITY_LIFE_TIME 0xFFFFFFFFU
#define VXLAN_VID_MAX (1u << 24) - 1 #define DHCP_ROUTE_METRIC 1024
#define DHCP_STATIC_ROUTE_METRIC 1024 #define IPV4LL_ROUTE_METRIC 2048
typedef struct NetDev NetDev; typedef struct NetDev NetDev;
typedef struct Network Network; typedef struct Network Network;
typedef struct Link Link; typedef struct Link Link;
typedef struct Address Address; typedef struct Address Address;
typedef struct Route Route; typedef struct Route Route;
typedef struct Manager Manager; typedef struct Manager Manager;
typedef struct AddressPool AddressPool; typedef struct AddressPool AddressPool;
typedef struct netdev_enslave_callback netdev_enslave_callback;
struct netdev_enslave_callback {
sd_rtnl_message_handler_t callback;
Link *link;
LIST_FIELDS(netdev_enslave_callback, callbacks);
};
typedef enum MacVlanMode {
NETDEV_MACVLAN_MODE_PRIVATE = MACVLAN_MODE_PRIVATE,
NETDEV_MACVLAN_MODE_VEPA = MACVLAN_MODE_VEPA,
NETDEV_MACVLAN_MODE_BRIDGE = MACVLAN_MODE_BRIDGE,
NETDEV_MACVLAN_MODE_PASSTHRU = MACVLAN_MODE_PASSTHRU,
_NETDEV_MACVLAN_MODE_MAX,
_NETDEV_MACVLAN_MODE_INVALID = -1
} MacVlanMode;
typedef enum NetDevKind {
NETDEV_KIND_BRIDGE,
NETDEV_KIND_BOND,
NETDEV_KIND_VLAN,
NETDEV_KIND_MACVLAN,
NETDEV_KIND_VXLAN,
NETDEV_KIND_IPIP,
NETDEV_KIND_GRE,
NETDEV_KIND_SIT,
NETDEV_KIND_VETH,
NETDEV_KIND_VTI,
NETDEV_KIND_DUMMY,
NETDEV_KIND_TUN,
NETDEV_KIND_TAP,
_NETDEV_KIND_MAX,
_NETDEV_KIND_INVALID = -1
} NetDevKind;
typedef enum NetDevState {
NETDEV_STATE_FAILED,
NETDEV_STATE_CREATING,
NETDEV_STATE_READY,
NETDEV_STATE_LINGER,
_NETDEV_STATE_MAX,
_NETDEV_STATE_INVALID = -1,
} NetDevState;
struct NetDev {
Manager *manager;
int n_ref;
char *filename;
Condition *match_host;
Condition *match_virt;
Condition *match_kernel;
Condition *match_arch;
char *description;
char *ifname;
char *ifname_peer;
char *user_name;
char *group_name;
size_t mtu;
struct ether_addr *mac;
struct ether_addr *mac_peer;
NetDevKind kind;
uint64_t vlanid;
uint64_t vxlanid;
int32_t macvlan_mode;
int ifindex;
NetDevState state;
bool tunnel_pmtudisc;
bool learning;
bool one_queue;
bool multi_queue;
bool packet_info;
unsigned ttl;
unsigned tos;
unsigned char family;
union in_addr_union local;
union in_addr_union remote;
union in_addr_union group;
LIST_HEAD(netdev_enslave_callback, callbacks);
};
typedef enum DHCPSupport { typedef enum DHCPSupport {
DHCP_SUPPORT_NONE, DHCP_SUPPORT_NONE,
DHCP_SUPPORT_BOTH, DHCP_SUPPORT_BOTH,
DHCP_SUPPORT_V4, DHCP_SUPPORT_V4,
DHCP_SUPPORT_V6, DHCP_SUPPORT_V6,
_DHCP_SUPPORT_MAX, _DHCP_SUPPORT_MAX,
_DHCP_SUPPORT_INVALID = -1, _DHCP_SUPPORT_INVALID = -1,
} DHCPSupport; } DHCPSupport;
typedef enum LLMNRSupport {
LLMNR_SUPPORT_NO,
LLMNR_SUPPORT_YES,
LLMNR_SUPPORT_RESOLVE,
_LLMNR_SUPPORT_MAX,
_LLMNR_SUPPORT_INVALID = -1,
} LLMNRSupport;
struct Network { struct Network {
Manager *manager; Manager *manager;
char *filename; char *filename;
struct ether_addr *match_mac; struct ether_addr *match_mac;
char *match_path; char *match_path;
char *match_driver; char *match_driver;
char *match_type; char *match_type;
char *match_name; char *match_name;
char *dhcp_vendor_class_identifier;
Condition *match_host; Condition *match_host;
Condition *match_virt; Condition *match_virt;
Condition *match_kernel; Condition *match_kernel;
Condition *match_arch; Condition *match_arch;
char *description; char *description;
NetDev *bridge; NetDev *bridge;
NetDev *bond; NetDev *bond;
NetDev *tunnel; Hashmap *stacked_netdevs;
Hashmap *vlans;
Hashmap *macvlans;
Hashmap *vxlans;
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_domainname; bool dhcp_domains;
bool dhcp_sendhost; bool dhcp_sendhost;
bool dhcp_broadcast;
bool dhcp_critical; bool dhcp_critical;
bool dhcp_routes; bool dhcp_routes;
bool ipv4ll; bool ipv4ll;
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;
LIST_HEAD(Address, dns); bool wildcard_domain;
LIST_HEAD(Address, ntp); char **domains, **dns, **ntp;
LLMNRSupport llmnr;
LIST_FIELDS(Network, networks); LIST_FIELDS(Network, networks);
}; };
struct Address { struct Address {
Network *network; Network *network;
uint64_t section; unsigned section;
unsigned char family; int family;
unsigned char prefixlen; unsigned char prefixlen;
unsigned char scope; unsigned char scope;
unsigned char flags;
char *label; char *label;
struct in_addr broadcast; struct in_addr broadcast;
struct ifa_cacheinfo cinfo; struct ifa_cacheinfo cinfo;
union in_addr_union in_addr; union in_addr_union in_addr;
union in_addr_union in_addr_peer;
LIST_FIELDS(Address, addresses); LIST_FIELDS(Address, addresses);
}; };
struct Route { struct Route {
Network *network; Network *network;
uint64_t section; unsigned section;
unsigned char 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_* */
union in_addr_union in_addr; union in_addr_union in_addr;
union in_addr_union dst_addr; union in_addr_union dst_addr;
LIST_FIELDS(Route, routes); LIST_FIELDS(Route, routes);
}; };
typedef enum LinkState {
LINK_STATE_INITIALIZING,
LINK_STATE_ENSLAVING,
LINK_STATE_SETTING_ADDRESSES,
LINK_STATE_SETTING_ROUTES,
LINK_STATE_CONFIGURED,
LINK_STATE_UNMANAGED,
LINK_STATE_FAILED,
LINK_STATE_LINGER,
_LINK_STATE_MAX,
_LINK_STATE_INVALID = -1
} LinkState;
typedef enum LinkOperationalState {
LINK_OPERSTATE_UNKNOWN,
LINK_OPERSTATE_DORMANT,
LINK_OPERSTATE_CARRIER,
LINK_OPERSTATE_DEGRADED,
LINK_OPERSTATE_ROUTABLE,
_LINK_OPERSTATE_MAX,
_LINK_OPERSTATE_INVALID = -1
} LinkOperationalState;
struct Link {
Manager *manager;
int n_ref;
uint64_t ifindex;
char *ifname;
char *state_file;
struct ether_addr mac;
struct udev_device *udev_device;
unsigned flags;
uint8_t kernel_operstate;
Network *network;
LinkState state;
LinkOperationalState operstate;
unsigned addr_messages;
unsigned route_messages;
unsigned enslaving;
LIST_HEAD(Address, addresses);
sd_dhcp_client *dhcp_client;
sd_dhcp_lease *dhcp_lease;
char *lease_file;
uint16_t original_mtu;
sd_ipv4ll *ipv4ll;
LIST_HEAD(Address, pool_addresses);
sd_dhcp_server *dhcp_server;
sd_icmp6_nd *icmp6_router_discovery;
sd_dhcp6_client *dhcp6_client;
};
struct AddressPool { struct AddressPool {
Manager *manager; Manager *manager;
unsigned family; int family;
unsigned prefixlen; unsigned prefixlen;
union in_addr_union in_addr; union in_addr_union in_addr;
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;
skipping to change at line 344 skipping to change at line 206
bool manager_should_reload(Manager *m); bool manager_should_reload(Manager *m);
int manager_rtnl_enumerate_links(Manager *m); int manager_rtnl_enumerate_links(Manager *m);
int manager_rtnl_listen(Manager *m); int manager_rtnl_listen(Manager *m);
int manager_udev_listen(Manager *m); int manager_udev_listen(Manager *m);
int manager_bus_listen(Manager *m); int manager_bus_listen(Manager *m);
int manager_save(Manager *m); int manager_save(Manager *m);
int manager_address_pool_acquire(Manager *m, unsigned family, unsigned pref ixlen, union in_addr_union *found); int manager_address_pool_acquire(Manager *m, int family, unsigned prefixlen , union in_addr_union *found);
DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free); DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free);
#define _cleanup_manager_free_ _cleanup_(manager_freep) #define _cleanup_manager_free_ _cleanup_(manager_freep)
/* NetDev */
#define VLANID_MAX 4094
int netdev_load(Manager *manager);
void netdev_drop(NetDev *netdev);
NetDev *netdev_unref(NetDev *netdev);
NetDev *netdev_ref(NetDev *netdev);
DEFINE_TRIVIAL_CLEANUP_FUNC(NetDev*, netdev_unref);
#define _cleanup_netdev_unref_ _cleanup_(netdev_unrefp)
int netdev_get(Manager *manager, const char *name, NetDev **ret);
int netdev_set_ifindex(NetDev *netdev, sd_rtnl_message *newlink);
int netdev_enslave(NetDev *netdev, Link *link, sd_rtnl_message_handler_t cb
);
int netdev_create_tunnel(NetDev *netdev, Link *link, sd_rtnl_message_handle
r_t callback);
int netdev_create_veth(NetDev *netdev, sd_rtnl_message_handler_t callback);
int netdev_create_vxlan(NetDev *netdev, Link *link, sd_rtnl_message_handler
_t callback);
int netdev_create_vlan(NetDev *netdev, Link *link, sd_rtnl_message_handler_
t callback);
int netdev_create_macvlan(NetDev *netdev, Link *link, sd_rtnl_message_handl
er_t callback);
int netdev_create_dummy(NetDev *netdev, sd_rtnl_message_handler_t callback)
;
int netdev_create_tuntap(NetDev *netdev);
const char *netdev_kind_to_string(NetDevKind d) _const_;
NetDevKind netdev_kind_from_string(const char *d) _pure_;
const char *macvlan_mode_to_string(MacVlanMode d) _const_;
MacVlanMode macvlan_mode_from_string(const char *d) _pure_;
int config_parse_netdev_kind(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_macvlan_mode(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);
/* gperf */
const struct ConfigPerfItem* network_netdev_gperf_lookup(const char *key, u
nsigned length);
/* Network */ /* Network */
int network_load(Manager *manager); int network_load(Manager *manager);
void network_free(Network *network); void network_free(Network *network);
DEFINE_TRIVIAL_CLEANUP_FUNC(Network*, network_free); DEFINE_TRIVIAL_CLEANUP_FUNC(Network*, network_free);
#define _cleanup_network_free_ _cleanup_(network_freep) #define _cleanup_network_free_ _cleanup_(network_freep)
int network_get(Manager *manager, struct udev_device *device, int network_get(Manager *manager, struct udev_device *device,
const char *ifname, const struct ether_addr *mac, const char *ifname, const struct ether_addr *mac,
Network **ret); Network **ret);
int network_apply(Manager *manager, Network *network, Link *link); int network_apply(Manager *manager, Network *network, Link *link);
int config_parse_netdev(const char *unit, const char *filename, unsigned li ne, int config_parse_netdev(const char *unit, const char *filename, unsigned li ne,
const char *section, unsigned section_line, const c har *lvalue, const char *section, unsigned section_line, const c har *lvalue,
int ltype, const char *rvalue, void *data, void *us erdata); int ltype, const char *rvalue, void *data, void *us erdata);
int config_parse_domains(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_tunnel(const char *unit, int config_parse_tunnel(const char *unit,
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);
skipping to change at line 431 skipping to change at line 267
int ltype, int ltype,
const char *rvalue, const char *rvalue,
void *data, void *data,
void *userdata); void *userdata);
/* gperf */ /* gperf */
const struct ConfigPerfItem* network_network_gperf_lookup(const char *key, unsigned length); const struct ConfigPerfItem* network_network_gperf_lookup(const char *key, unsigned length);
/* Route */ /* Route */
int route_new_static(Network *network, unsigned section, Route **ret); int route_new_static(Network *network, unsigned section, Route **ret);
int route_new_dynamic(Route **ret); int route_new_dynamic(Route **ret, unsigned char rtm_protocol);
void route_free(Route *route); void route_free(Route *route);
int route_configure(Route *route, Link *link, sd_rtnl_message_handler_t cal lback); int route_configure(Route *route, Link *link, sd_rtnl_message_handler_t cal lback);
int route_drop(Route *route, Link *link, sd_rtnl_message_handler_t callback ); int route_drop(Route *route, Link *link, sd_rtnl_message_handler_t callback );
DEFINE_TRIVIAL_CLEANUP_FUNC(Route*, route_free); DEFINE_TRIVIAL_CLEANUP_FUNC(Route*, route_free);
#define _cleanup_route_free_ _cleanup_(route_freep) #define _cleanup_route_free_ _cleanup_(route_freep)
int config_parse_gateway(const char *unit, const char *filename, unsigned l ine, int config_parse_gateway(const char *unit, const char *filename, unsigned l ine,
const char *section, unsigned section_line, const char *lvalue, const char *section, unsigned section_line, const char *lvalue,
int ltype, const char *rvalue, void *data, void *u serdata); int ltype, const char *rvalue, void *data, void *u serdata);
int config_parse_destination(const char *unit, const char *filename, unsign ed line, int config_parse_destination(const char *unit, const char *filename, unsign ed line,
const char *section, unsigned section_line, co nst char *lvalue, const char *section, unsigned section_line, co nst char *lvalue,
int ltype, const char *rvalue, void *data, voi d *userdata); int ltype, const char *rvalue, void *data, voi d *userdata);
int config_parse_route_priority(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);
/* Address */ /* Address */
int address_new_static(Network *network, unsigned section, Address **ret); int address_new_static(Network *network, unsigned section, Address **ret);
int address_new_dynamic(Address **ret); int address_new_dynamic(Address **ret);
void address_free(Address *address); void address_free(Address *address);
int address_configure(Address *address, Link *link, sd_rtnl_message_handler _t callback); int address_configure(Address *address, Link *link, sd_rtnl_message_handler _t callback);
int address_update(Address *address, Link *link, sd_rtnl_message_handler_t callback); int address_update(Address *address, Link *link, sd_rtnl_message_handler_t callback);
int address_drop(Address *address, Link *link, sd_rtnl_message_handler_t ca llback); int address_drop(Address *address, Link *link, sd_rtnl_message_handler_t ca llback);
bool address_equal(Address *a1, Address *a2); bool address_equal(Address *a1, Address *a2);
DEFINE_TRIVIAL_CLEANUP_FUNC(Address*, address_free); DEFINE_TRIVIAL_CLEANUP_FUNC(Address*, address_free);
#define _cleanup_address_free_ _cleanup_(address_freep) #define _cleanup_address_free_ _cleanup_(address_freep)
int config_parse_dns(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 *userd
ata);
int config_parse_address(const char *unit, const char *filename, unsigned l ine, int config_parse_address(const char *unit, const char *filename, unsigned l ine,
const char *section, unsigned section_line, const char *lvalue, const char *section, unsigned section_line, const char *lvalue,
int ltype, const char *rvalue, void *data, void *u serdata); int ltype, const char *rvalue, void *data, void *u serdata);
int config_parse_broadcast(const char *unit, const char *filename, unsigned line, int config_parse_broadcast(const char *unit, const char *filename, unsigned line,
const char *section, unsigned section_line, cons t char *lvalue, const char *section, unsigned section_line, cons t char *lvalue,
int ltype, const char *rvalue, void *data, void *userdata); int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_label(const char *unit, const char *filename, unsigned lin e, int config_parse_label(const char *unit, const char *filename, unsigned lin e,
const char *section, unsigned section_line, const ch ar *lvalue, const char *section, unsigned section_line, const ch ar *lvalue,
int ltype, const char *rvalue, void *data, void *use rdata); int ltype, const char *rvalue, void *data, void *use rdata);
/* Link */
Link *link_unref(Link *link);
Link *link_ref(Link *link);
int link_get(Manager *m, int ifindex, Link **ret);
int link_add(Manager *manager, sd_rtnl_message *message, Link **ret);
void link_drop(Link *link);
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_initialized(Link *link, struct udev_device *device);
int link_save(Link *link);
bool link_has_carrier(unsigned flags, uint8_t operstate);
const char* link_state_to_string(LinkState s) _const_;
LinkState link_state_from_string(const char *s) _pure_;
const char* link_operstate_to_string(LinkOperationalState s) _const_;
LinkOperationalState link_operstate_from_string(const char *s) _pure_;
DEFINE_TRIVIAL_CLEANUP_FUNC(Link*, link_unref);
#define _cleanup_link_unref_ _cleanup_(link_unrefp)
/* DHCP support */ /* DHCP support */
const char* dhcp_support_to_string(DHCPSupport i) _const_; const char* dhcp_support_to_string(DHCPSupport i) _const_;
DHCPSupport dhcp_support_from_string(const char *s) _pure_; DHCPSupport dhcp_support_from_string(const char *s) _pure_;
int config_parse_dhcp(const char *unit, const char *filename, unsigned line , int config_parse_dhcp(const char *unit, const char *filename, unsigned line ,
const char *section, unsigned section_line, const cha r *lvalue, const char *section, unsigned section_line, const cha r *lvalue,
int ltype, const char *rvalue, void *data, void *user data); int ltype, const char *rvalue, void *data, void *user data);
/* LLMNR support */
const char* llmnr_support_to_string(LLMNRSupport i) _const_;
LLMNRSupport llmnr_support_from_string(const char *s) _pure_;
int config_parse_llmnr(const char *unit, const char *filename, unsigned lin
e,
const char *section, unsigned section_line, const cha
r *lvalue,
int ltype, const char *rvalue, void *data, void *user
data);
/* Address Pool */ /* Address Pool */
int address_pool_new(Manager *m, AddressPool **ret, unsigned family, const int address_pool_new(Manager *m, AddressPool **ret, int family, const union
union in_addr_union *u, unsigned prefixlen); in_addr_union *u, unsigned prefixlen);
int address_pool_new_from_string(Manager *m, AddressPool **ret, unsigned fa int address_pool_new_from_string(Manager *m, AddressPool **ret, int family,
mily, const char *p, unsigned prefixlen); const char *p, unsigned prefixlen);
void address_pool_free(AddressPool *p); void address_pool_free(AddressPool *p);
int address_pool_acquire(AddressPool *p, unsigned prefixlen, union in_addr_ union *found); int address_pool_acquire(AddressPool *p, unsigned prefixlen, union in_addr_ union *found);
/* Macros which append INTERFACE= to the message */ /* Macros which append INTERFACE= to the message */
#define log_full_link(level, link, fmt, ...) log_meta_object(level, __FILE_ _, __LINE__, __func__, "INTERFACE=", link->ifname, "%-*s: " fmt, IFNAMSIZ, link->ifname, ##__VA_ARGS__) #define log_full_link(level, link, fmt, ...) log_meta_object(level, __FILE_ _, __LINE__, __func__, "INTERFACE=", link->ifname, "%-*s: " fmt, IFNAMSIZ, link->ifname, ##__VA_ARGS__)
#define log_debug_link(link, ...) log_full_link(LOG_DEBUG, link, ##__ VA_ARGS__) #define log_debug_link(link, ...) log_full_link(LOG_DEBUG, link, ##__ VA_ARGS__)
#define log_info_link(link, ...) log_full_link(LOG_INFO, link, ##__V A_ARGS__) #define log_info_link(link, ...) log_full_link(LOG_INFO, link, ##__V A_ARGS__)
#define log_notice_link(link, ...) log_full_link(LOG_NOTICE, link, ##_ _VA_ARGS__) #define log_notice_link(link, ...) log_full_link(LOG_NOTICE, link, ##_ _VA_ARGS__)
#define log_warning_link(link, ...) log_full_link(LOG_WARNING, link, ## __VA_ARGS__) #define log_warning_link(link, ...) log_full_link(LOG_WARNING, link, ## __VA_ARGS__)
#define log_error_link(link, ...) log_full_link(LOG_ERR, link, ##__VA _ARGS__) #define log_error_link(link, ...) log_full_link(LOG_ERR, link, ##__VA _ARGS__)
#define log_struct_link(level, link, ...) log_struct(level, "INTERFACE=%s", link->ifname, __VA_ARGS__) #define log_struct_link(level, link, ...) log_struct(level, "INTERFACE=%s", link->ifname, __VA_ARGS__)
/* More macros which append INTERFACE= to the message */
#define log_full_netdev(level, netdev, fmt, ...) log_meta_object(level, __F
ILE__, __LINE__, __func__, "INTERFACE=", netdev->ifname, "%-*s: " fmt, IFNA
MSIZ, netdev->ifname, ##__VA_ARGS__)
#define log_debug_netdev(netdev, ...) log_full_netdev(LOG_DEBUG, netd
ev, ##__VA_ARGS__)
#define log_info_netdev(netdev, ...) log_full_netdev(LOG_INFO, netde
v, ##__VA_ARGS__)
#define log_notice_netdev(netdev, ...) log_full_netdev(LOG_NOTICE, net
dev, ##__VA_ARGS__)
#define log_warning_netdev(netdev, ...) log_full_netdev(LOG_WARNING, ne
tdev,## __VA_ARGS__)
#define log_error_netdev(netdev, ...) log_full_netdev(LOG_ERR, netdev
, ##__VA_ARGS__)
#define log_struct_netdev(level, netdev, ...) log_struct(level, "INTERFACE=
%s", netdev->ifname, __VA_ARGS__)
#define NETDEV(netdev) "INTERFACE=%s", netdev->ifname
#define ADDRESS_FMT_VAL(address) \ #define ADDRESS_FMT_VAL(address) \
(address).s_addr & 0xFF, \ (address).s_addr & 0xFF, \
((address).s_addr >> 8) & 0xFF, \ ((address).s_addr >> 8) & 0xFF, \
((address).s_addr >> 16) & 0xFF, \ ((address).s_addr >> 16) & 0xFF, \
(address).s_addr >> 24 (address).s_addr >> 24
 End of changes. 29 change blocks. 
274 lines changed or deleted 64 lines changed or added


 pager.h   pager.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 "macro.h" #include "macro.h"
int pager_open(bool jump_to_end); int pager_open(bool jump_to_end);
void pager_close(void); void pager_close(void);
bool pager_have(void) _pure_; bool pager_have(void) _pure_;
int show_man_page(const char *page, bool null_stdio);
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added


 path-lookup.h   path-lookup.h 
skipping to change at line 43 skipping to change at line 43
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) #define _cleanup_lookup_paths_free_ _cleanup_(lookup_paths_free)
const char* systemd_running_as_to_string(SystemdRunningAs i) _const_;
SystemdRunningAs systemd_running_as_from_string(const char *s) _pure_;
int user_config_home(char **config_home); int user_config_home(char **config_home);
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);
 End of changes. 1 change blocks. 
3 lines changed or deleted 0 lines changed or added


 path-util.h   path-util.h 
skipping to change at line 48 skipping to change at line 48
bool is_path(const char *p) _pure_; bool is_path(const char *p) _pure_;
char** path_split_and_make_absolute(const char *p); char** path_split_and_make_absolute(const char *p);
int path_get_parent(const char *path, char **parent); int path_get_parent(const char *path, char **parent);
bool path_is_absolute(const char *p) _pure_; bool path_is_absolute(const char *p) _pure_;
char* path_make_absolute(const char *p, const char *prefix); char* path_make_absolute(const char *p, const char *prefix);
char* path_make_absolute_cwd(const char *p); char* path_make_absolute_cwd(const char *p);
int path_make_relative(const char *from_dir, const char *to_path, char **_r ); int path_make_relative(const char *from_dir, const char *to_path, char **_r );
char* path_kill_slashes(char *path); char* path_kill_slashes(char *path);
char* path_startswith(const char *path, const char *prefix) _pure_; char* path_startswith(const char *path, const char *prefix) _pure_;
bool path_equal(const char *a, const char *b) _pure_; bool path_equal(const char *a, const char *b) _pure_;
char* path_join(const char *root, const char *path, const char *rest);
char** path_strv_make_absolute_cwd(char **l); char** path_strv_make_absolute_cwd(char **l);
char** path_strv_resolve(char **l, const char *prefix); char** path_strv_resolve(char **l, const char *prefix);
char** path_strv_resolve_uniq(char **l, const char *prefix); char** path_strv_resolve_uniq(char **l, const char *prefix);
int path_is_mount_point(const char *path, bool allow_symlink); int path_is_mount_point(const char *path, bool allow_symlink);
int path_is_read_only_fs(const char *path); int path_is_read_only_fs(const char *path);
int path_is_os_tree(const char *path); int path_is_os_tree(const char *path);
int find_binary(const char *name, char **filename); int find_binary(const char *name, char **filename);
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 ring.h   ring.h 
skipping to change at line 30 skipping to change at line 30
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 <errno.h> #include <errno.h>
#include <inttypes.h> #include <inttypes.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <sys/uio.h> #include <sys/uio.h>
struct ring { typedef struct Ring Ring;
struct Ring {
uint8_t *buf; /* buffer or NULL */ uint8_t *buf; /* buffer or NULL */
size_t size; /* actual size of @buf */ size_t size; /* actual size of @buf */
size_t start; /* start position of ring */ size_t start; /* start position of ring */
size_t used; /* number of actually used bytes */ size_t used; /* number of actually used bytes */
}; };
/* flush buffer so it is empty again */ /* flush buffer so it is empty again */
void ring_flush(struct ring *r); void ring_flush(Ring *r);
/* flush buffer, free allocated data and reset to initial state */ /* flush buffer, free allocated data and reset to initial state */
void ring_clear(struct ring *r); void ring_clear(Ring *r);
/* get pointers to buffer data and their length */ /* get pointers to buffer data and their length */
size_t ring_peek(struct ring *r, struct iovec *vec); size_t ring_peek(Ring *r, struct iovec *vec);
/* copy data into external linear buffer */ /* copy data into external linear buffer */
size_t ring_copy(struct ring *r, void *buf, size_t size); size_t ring_copy(Ring *r, void *buf, size_t size);
/* push data to the end of the buffer */ /* push data to the end of the buffer */
int ring_push(struct ring *r, const void *u8, size_t size); int ring_push(Ring *r, const void *u8, size_t size);
/* pull data from the front of the buffer */ /* pull data from the front of the buffer */
void ring_pull(struct ring *r, size_t size); void ring_pull(Ring *r, size_t size);
/* return size of occupied buffer in bytes */ /* return size of occupied buffer in bytes */
static inline size_t ring_get_size(struct ring *r) static inline size_t ring_get_size(Ring *r)
{ {
return r->used; return r->used;
} }
 End of changes. 8 change blocks. 
8 lines changed or deleted 10 lines changed or added


 rtnl-types.h   rtnl-types.h 
skipping to change at line 66 skipping to change at line 66
uint16_t type; uint16_t type;
size_t size; size_t size;
const NLTypeSystem *type_system; const NLTypeSystem *type_system;
const NLTypeSystemUnion *type_system_union; const NLTypeSystemUnion *type_system_union;
}; };
int type_system_get_type(const NLTypeSystem *type_system, const NLType **re t, uint16_t type); int type_system_get_type(const NLTypeSystem *type_system, const NLType **re t, uint16_t type);
int type_system_get_type_system(const NLTypeSystem *type_system, const NLTy peSystem **ret, uint16_t type); int type_system_get_type_system(const NLTypeSystem *type_system, const NLTy peSystem **ret, uint16_t type);
int type_system_get_type_system_union(const NLTypeSystem *type_system, cons t NLTypeSystemUnion **ret, uint16_t type); int type_system_get_type_system_union(const NLTypeSystem *type_system, cons t NLTypeSystemUnion **ret, uint16_t type);
int type_system_union_get_type_system(const NLTypeSystemUnion *type_system_ union, const NLTypeSystem **ret, const char *key); int type_system_union_get_type_system(const NLTypeSystemUnion *type_system_ union, const NLTypeSystem **ret, const char *key);
typedef enum NLUnionLinkInfoData {
NL_UNION_LINK_INFO_DATA_BOND,
NL_UNION_LINK_INFO_DATA_BRIDGE,
NL_UNION_LINK_INFO_DATA_VLAN,
NL_UNION_LINK_INFO_DATA_VETH,
NL_UNION_LINK_INFO_DATA_DUMMY,
NL_UNION_LINK_INFO_DATA_MACVLAN,
NL_UNION_LINK_INFO_DATA_VXLAN,
NL_UNION_LINK_INFO_DATA_IPIP_TUNNEL,
NL_UNION_LINK_INFO_DATA_IPGRE_TUNNEL,
NL_UNION_LINK_INFO_DATA_SIT_TUNNEL,
NL_UNION_LINK_INFO_DATA_VTI_TUNNEL,
_NL_UNION_LINK_INFO_DATA_MAX,
_NL_UNION_LINK_INFO_DATA_INVALID = -1
} NLUnionLinkInfoData;
const char *nl_union_link_info_data_to_string(NLUnionLinkInfoData p) _const
_;
NLUnionLinkInfoData nl_union_link_info_data_from_string(const char *p) _pur
e_;
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added


 rtnl-util.h   rtnl-util.h 
skipping to change at line 40 skipping to change at line 40
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, const struct ether_addr *mac, unsigned mtu); int rtnl_set_link_properties(sd_rtnl *rtnl, int ifindex, const char *alias, const struct ether_addr *mac, unsigned mtu);
int rtnl_log_parse_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. 
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 "sd-memfd.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 151 skipping to change at line 151
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);
int sd_bus_get_timeout(sd_bus *bus, uint64_t *timeout_usec); int sd_bus_get_timeout(sd_bus *bus, uint64_t *timeout_usec);
int sd_bus_process(sd_bus *bus, sd_bus_message **r); int sd_bus_process(sd_bus *bus, sd_bus_message **r);
int sd_bus_process_priority(sd_bus *bus, int64_t max_priority, sd_bus_messa ge **r); int sd_bus_process_priority(sd_bus *bus, int64_t max_priority, sd_bus_messa ge **r);
int sd_bus_wait(sd_bus *bus, uint64_t timeout_usec); int sd_bus_wait(sd_bus *bus, uint64_t timeout_usec);
int sd_bus_flush(sd_bus *bus); int sd_bus_flush(sd_bus *bus);
sd_bus_message* sd_bus_get_current_message(sd_bus *bus);
sd_bus_slot* sd_bus_get_current_slot(sd_bus *bus); sd_bus_slot* sd_bus_get_current_slot(sd_bus *bus);
sd_bus_message* sd_bus_get_current_message(sd_bus *bus);
sd_bus_message_handler_t sd_bus_get_current_handler(sd_bus *bus);
void* sd_bus_get_current_userdata(sd_bus *bus);
int sd_bus_attach_event(sd_bus *bus, sd_event *e, int priority); int sd_bus_attach_event(sd_bus *bus, sd_event *e, int priority);
int sd_bus_detach_event(sd_bus *bus); int sd_bus_detach_event(sd_bus *bus);
sd_event *sd_bus_get_event(sd_bus *bus); sd_event *sd_bus_get_event(sd_bus *bus);
int sd_bus_add_filter(sd_bus *bus, sd_bus_slot **slot, sd_bus_message_handl er_t callback, void *userdata); int sd_bus_add_filter(sd_bus *bus, sd_bus_slot **slot, sd_bus_message_handl er_t callback, void *userdata);
int sd_bus_add_match(sd_bus *bus, sd_bus_slot **slot, const char *match, sd _bus_message_handler_t callback, void *userdata); int sd_bus_add_match(sd_bus *bus, sd_bus_slot **slot, const char *match, sd _bus_message_handler_t callback, void *userdata);
int sd_bus_add_object(sd_bus *bus, sd_bus_slot **slot, const char *path, sd _bus_message_handler_t callback, void *userdata); int sd_bus_add_object(sd_bus *bus, sd_bus_slot **slot, const char *path, sd _bus_message_handler_t callback, void *userdata);
int sd_bus_add_fallback(sd_bus *bus, sd_bus_slot **slot, const char *prefix , sd_bus_message_handler_t callback, void *userdata); int sd_bus_add_fallback(sd_bus *bus, sd_bus_slot **slot, const char *prefix , sd_bus_message_handler_t callback, void *userdata);
int sd_bus_add_object_vtable(sd_bus *bus, sd_bus_slot **slot, const char *p ath, const char *interface, const sd_bus_vtable *vtable, void *userdata); int sd_bus_add_object_vtable(sd_bus *bus, sd_bus_slot **slot, const char *p ath, const char *interface, const sd_bus_vtable *vtable, void *userdata);
skipping to change at line 178 skipping to change at line 180
sd_bus_slot* sd_bus_slot_ref(sd_bus_slot *slot); sd_bus_slot* sd_bus_slot_ref(sd_bus_slot *slot);
sd_bus_slot* sd_bus_slot_unref(sd_bus_slot *slot); sd_bus_slot* sd_bus_slot_unref(sd_bus_slot *slot);
sd_bus* sd_bus_slot_get_bus(sd_bus_slot *slot); sd_bus* sd_bus_slot_get_bus(sd_bus_slot *slot);
void *sd_bus_slot_get_userdata(sd_bus_slot *slot); void *sd_bus_slot_get_userdata(sd_bus_slot *slot);
void *sd_bus_slot_set_userdata(sd_bus_slot *slot, void *userdata); void *sd_bus_slot_set_userdata(sd_bus_slot *slot, void *userdata);
sd_bus_message* sd_bus_slot_get_current_message(sd_bus_slot *slot); sd_bus_message* sd_bus_slot_get_current_message(sd_bus_slot *slot);
sd_bus_message_handler_t sd_bus_slot_get_current_handler(sd_bus_slot *bus);
void *sd_bus_slot_get_current_userdata(sd_bus_slot *slot);
/* Message object */ /* Message object */
int sd_bus_message_new_signal(sd_bus *bus, sd_bus_message **m, const char * path, const char *interface, const char *member); int sd_bus_message_new_signal(sd_bus *bus, sd_bus_message **m, const char * path, const char *interface, const char *member);
int sd_bus_message_new_method_call(sd_bus *bus, sd_bus_message **m, const c har *destination, const char *path, const char *interface, const char *memb er); int sd_bus_message_new_method_call(sd_bus *bus, sd_bus_message **m, const c har *destination, const char *path, const char *interface, const char *memb er);
int sd_bus_message_new_method_return(sd_bus_message *call, sd_bus_message * *m); int sd_bus_message_new_method_return(sd_bus_message *call, sd_bus_message * *m);
int sd_bus_message_new_method_error(sd_bus_message *call, sd_bus_message ** m, const sd_bus_error *e); int sd_bus_message_new_method_error(sd_bus_message *call, sd_bus_message ** m, const sd_bus_error *e);
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);
skipping to change at line 229 skipping to change at line 233
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_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, sd_memf d *memfd); 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);
int sd_bus_message_append_string_iovec(sd_bus_message *m, const struct iove c *iov, unsigned n); int sd_bus_message_append_string_iovec(sd_bus_message *m, const struct iove c *iov, unsigned n);
int sd_bus_message_append_string_memfd(sd_bus_message *m, sd_memfd* memfd); int sd_bus_message_append_string_memfd(sd_bus_message *m, int memfd);
int sd_bus_message_append_strv(sd_bus_message *m, char **l); int sd_bus_message_append_strv(sd_bus_message *m, char **l);
int sd_bus_message_open_container(sd_bus_message *m, char type, const char *contents); int sd_bus_message_open_container(sd_bus_message *m, char type, const char *contents);
int sd_bus_message_close_container(sd_bus_message *m); int sd_bus_message_close_container(sd_bus_message *m);
int sd_bus_message_copy(sd_bus_message *m, sd_bus_message *source, int all) ; int sd_bus_message_copy(sd_bus_message *m, sd_bus_message *source, int all) ;
int sd_bus_message_read(sd_bus_message *m, const char *types, ...); int sd_bus_message_read(sd_bus_message *m, const char *types, ...);
int sd_bus_message_read_basic(sd_bus_message *m, char type, void *p); int sd_bus_message_read_basic(sd_bus_message *m, char type, void *p);
int sd_bus_message_read_array(sd_bus_message *m, char type, const void **pt r, size_t *size); int sd_bus_message_read_array(sd_bus_message *m, char type, const void **pt r, size_t *size);
int sd_bus_message_read_strv(sd_bus_message *m, char ***l); /* free the res ult! */ int sd_bus_message_read_strv(sd_bus_message *m, char ***l); /* free the res ult! */
int sd_bus_message_skip(sd_bus_message *m, const char *types); int sd_bus_message_skip(sd_bus_message *m, const char *types);
skipping to change at line 285 skipping to change at line 289
int sd_bus_emit_properties_changed_strv(sd_bus *bus, const char *path, cons t char *interface, char **names); int sd_bus_emit_properties_changed_strv(sd_bus *bus, const char *path, cons t char *interface, char **names);
int sd_bus_emit_properties_changed(sd_bus *bus, const char *path, const cha r *interface, const char *name, ...) _sd_sentinel_; int sd_bus_emit_properties_changed(sd_bus *bus, const char *path, const cha r *interface, const char *name, ...) _sd_sentinel_;
int sd_bus_emit_interfaces_added_strv(sd_bus *bus, const char *path, char * *interfaces); int sd_bus_emit_interfaces_added_strv(sd_bus *bus, const char *path, char * *interfaces);
int sd_bus_emit_interfaces_added(sd_bus *bus, const char *path, const char *interface, ...) _sd_sentinel_; int sd_bus_emit_interfaces_added(sd_bus *bus, const char *path, const char *interface, ...) _sd_sentinel_;
int sd_bus_emit_interfaces_removed_strv(sd_bus *bus, const char *path, char **interfaces); int sd_bus_emit_interfaces_removed_strv(sd_bus *bus, const char *path, char **interfaces);
int sd_bus_emit_interfaces_removed(sd_bus *bus, const char *path, const cha r *interface, ...) _sd_sentinel_; int sd_bus_emit_interfaces_removed(sd_bus *bus, const char *path, const cha r *interface, ...) _sd_sentinel_;
int sd_bus_query_sender_creds(sd_bus_message *call, uint64_t mask, sd_bus_c reds **creds); int sd_bus_query_sender_creds(sd_bus_message *call, uint64_t mask, sd_bus_c reds **creds);
int sd_bus_query_sender_privilege(sd_bus_message *call, int capability);
/* Credential handling */ /* Credential handling */
int sd_bus_creds_new_from_pid(sd_bus_creds **ret, pid_t pid, uint64_t creds _mask); int sd_bus_creds_new_from_pid(sd_bus_creds **ret, pid_t pid, uint64_t creds _mask);
sd_bus_creds *sd_bus_creds_ref(sd_bus_creds *c); sd_bus_creds *sd_bus_creds_ref(sd_bus_creds *c);
sd_bus_creds *sd_bus_creds_unref(sd_bus_creds *c); sd_bus_creds *sd_bus_creds_unref(sd_bus_creds *c);
uint64_t sd_bus_creds_get_mask(const sd_bus_creds *c); uint64_t sd_bus_creds_get_mask(const sd_bus_creds *c);
int sd_bus_creds_get_pid(sd_bus_creds *c, pid_t *pid); int sd_bus_creds_get_pid(sd_bus_creds *c, pid_t *pid);
int sd_bus_creds_get_pid_starttime(sd_bus_creds *c, uint64_t *usec); int sd_bus_creds_get_pid_starttime(sd_bus_creds *c, uint64_t *usec);
 End of changes. 7 change blocks. 
4 lines changed or deleted 9 lines changed or added


 sd-dhcp-client.h   sd-dhcp-client.h 
skipping to change at line 33 skipping to change at line 33
***/ ***/
#include <netinet/in.h> #include <netinet/in.h>
#include <net/ethernet.h> #include <net/ethernet.h>
#include "sd-event.h" #include "sd-event.h"
#include "sd-dhcp-lease.h" #include "sd-dhcp-lease.h"
enum { enum {
DHCP_EVENT_STOP = 0, DHCP_EVENT_STOP = 0,
DHCP_EVENT_NO_LEASE = 1, DHCP_EVENT_IP_ACQUIRE = 1,
DHCP_EVENT_IP_ACQUIRE = 2, DHCP_EVENT_IP_CHANGE = 2,
DHCP_EVENT_IP_CHANGE = 3, DHCP_EVENT_EXPIRED = 3,
DHCP_EVENT_EXPIRED = 4, DHCP_EVENT_RENEW = 4,
DHCP_EVENT_RENEW = 5,
}; };
typedef struct sd_dhcp_client sd_dhcp_client; typedef struct sd_dhcp_client sd_dhcp_client;
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_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 struct ether_addr *addr); const struct ether_addr *addr);
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_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);
int sd_dhcp_client_new(sd_dhcp_client **ret); int sd_dhcp_client_new(sd_dhcp_client **ret);
 End of changes. 4 change blocks. 
5 lines changed or deleted 7 lines changed or added


 sd-dhcp-lease.h   sd-dhcp-lease.h 
skipping to change at line 34 skipping to change at line 34
***/ ***/
#include <netinet/in.h> #include <netinet/in.h>
#include <net/ethernet.h> #include <net/ethernet.h>
typedef struct sd_dhcp_lease sd_dhcp_lease; typedef struct sd_dhcp_lease sd_dhcp_lease;
struct sd_dhcp_route; struct sd_dhcp_route;
sd_dhcp_lease *sd_dhcp_lease_ref(sd_dhcp_lease *lease); sd_dhcp_lease *sd_dhcp_lease_ref(sd_dhcp_lease *lease);
sd_dhcp_lease *sd_dhcp_lease_unref(sd_dhcp_lease *lease); sd_dhcp_lease *sd_dhcp_lease_unref(sd_dhcp_lease *lease);
int sd_dhcp_lease_get_address(sd_dhcp_lease *lease, struct in_addr *addr); int sd_dhcp_lease_get_address(sd_dhcp_lease *lease, struct in_addr *addr);
int sd_dhcp_lease_get_lifetime(sd_dhcp_lease *lease, uint32_t *lifetime); int sd_dhcp_lease_get_lifetime(sd_dhcp_lease *lease, uint32_t *lifetime);
int sd_dhcp_lease_get_netmask(sd_dhcp_lease *lease, struct in_addr *addr); int sd_dhcp_lease_get_netmask(sd_dhcp_lease *lease, struct in_addr *addr);
int sd_dhcp_lease_get_router(sd_dhcp_lease *lease, struct in_addr *addr); int sd_dhcp_lease_get_router(sd_dhcp_lease *lease, struct in_addr *addr);
int sd_dhcp_lease_get_next_server(sd_dhcp_lease *lease, struct in_addr *add r); int sd_dhcp_lease_get_next_server(sd_dhcp_lease *lease, struct in_addr *add r);
int sd_dhcp_lease_get_server_identifier(sd_dhcp_lease *lease, struct in_add r *addr); int sd_dhcp_lease_get_server_identifier(sd_dhcp_lease *lease, struct in_add r *addr);
int sd_dhcp_lease_get_dns(sd_dhcp_lease *lease, struct in_addr **addr, size int sd_dhcp_lease_get_dns(sd_dhcp_lease *lease, const struct in_addr **addr
_t *addr_size); );
int sd_dhcp_lease_get_ntp(sd_dhcp_lease *lease, struct in_addr **addr, size int sd_dhcp_lease_get_ntp(sd_dhcp_lease *lease, const struct in_addr **addr
_t *addr_size); );
int sd_dhcp_lease_get_mtu(sd_dhcp_lease *lease, uint16_t *mtu); int sd_dhcp_lease_get_mtu(sd_dhcp_lease *lease, uint16_t *mtu);
int sd_dhcp_lease_get_domainname(sd_dhcp_lease *lease, const char **domainn ame); int sd_dhcp_lease_get_domainname(sd_dhcp_lease *lease, const char **domainn ame);
int sd_dhcp_lease_get_hostname(sd_dhcp_lease *lease, const char **hostname) ; int sd_dhcp_lease_get_hostname(sd_dhcp_lease *lease, const char **hostname) ;
int sd_dhcp_lease_get_root_path(sd_dhcp_lease *lease, const char **root_pat h); int sd_dhcp_lease_get_root_path(sd_dhcp_lease *lease, const char **root_pat h);
int sd_dhcp_lease_get_routes(sd_dhcp_lease *lease, struct sd_dhcp_route **r int sd_dhcp_lease_get_routes(sd_dhcp_lease *lease, struct sd_dhcp_route **r
outes, size_t *routes_size); outesgn);
#endif #endif
 End of changes. 3 change blocks. 
6 lines changed or deleted 8 lines changed or added


 sd-dhcp-server.h   sd-dhcp-server.h 
skipping to change at line 47 skipping to change at line 47
int sd_dhcp_server_attach_event(sd_dhcp_server *client, sd_event *event, in t priority); int sd_dhcp_server_attach_event(sd_dhcp_server *client, sd_event *event, in t priority);
int sd_dhcp_server_detach_event(sd_dhcp_server *client); int sd_dhcp_server_detach_event(sd_dhcp_server *client);
sd_event *sd_dhcp_server_get_event(sd_dhcp_server *client); sd_event *sd_dhcp_server_get_event(sd_dhcp_server *client);
bool sd_dhcp_server_is_running(sd_dhcp_server *server); bool sd_dhcp_server_is_running(sd_dhcp_server *server);
int sd_dhcp_server_start(sd_dhcp_server *server); int sd_dhcp_server_start(sd_dhcp_server *server);
int sd_dhcp_server_stop(sd_dhcp_server *server); int sd_dhcp_server_stop(sd_dhcp_server *server);
int sd_dhcp_server_set_address(sd_dhcp_server *server, struct in_addr *addr ess); int sd_dhcp_server_set_address(sd_dhcp_server *server, struct in_addr *addr ess, unsigned char prefixlen);
int sd_dhcp_server_set_lease_pool(sd_dhcp_server *server, struct in_addr *s tart, size_t size); int sd_dhcp_server_set_lease_pool(sd_dhcp_server *server, struct in_addr *s tart, size_t size);
int sd_dhcp_server_forcerenew(sd_dhcp_server *server);
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added


 sd-login.h   sd-login.h 
skipping to change at line 184 skipping to change at line 184
/* Return whether the seat is TTY capable, i.e. suitable for showing consol e UIs */ /* Return whether the seat is TTY capable, i.e. suitable for showing consol e UIs */
int sd_seat_can_tty(const char *seat); int sd_seat_can_tty(const char *seat);
/* Return whether the seat is graphics capable, i.e. suitable for showing g raphical UIs */ /* Return whether the seat is graphics capable, i.e. suitable for showing g raphical UIs */
int sd_seat_can_graphical(const char *seat); int sd_seat_can_graphical(const char *seat);
/* Return the class of machine */ /* Return the class of machine */
int sd_machine_get_class(const char *machine, char **clazz); int sd_machine_get_class(const char *machine, char **clazz);
/* Return the list if host-side network interface indices of a machine */
int sd_machine_get_ifindices(const char *machine, int **ifindices);
/* Get all seats, store in *seats. Returns the number of seats. If /* Get all seats, store in *seats. Returns the number of seats. If
* seats is NULL, this only returns the number of seats. */ * seats is NULL, this only returns the number of seats. */
int sd_get_seats(char ***seats); int sd_get_seats(char ***seats);
/* Get all sessions, store in *sessions. Returns the number of /* Get all sessions, store in *sessions. Returns the number of
* sessions. If sessions is NULL, this only returns the number of sessions. */ * sessions. If sessions is NULL, this only returns the number of sessions. */
int sd_get_sessions(char ***sessions); int sd_get_sessions(char ***sessions);
/* Get all logged in users, store in *users. Returns the number of /* Get all logged in users, store in *users. Returns the number of
* users. If users is NULL, this only returns the number of users. */ * users. If users is NULL, this only returns the number of users. */
 End of changes. 1 change blocks. 
0 lines changed or deleted 3 lines changed or added


 sd-network.h   sd-network.h 
skipping to change at line 29 skipping to change at line 29
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 <sys/types.h>
#include <inttypes.h> #include <inttypes.h>
#include "sd-dhcp-lease.h"
#include "_sd-common.h" #include "_sd-common.h"
/* /*
* A few points: * A few points:
* *
* Instead of returning an empty string array or empty integer array, we * Instead of returning an empty string array or empty integer array, we
* may return NULL. * may return NULL.
* *
* Free the data the library returns with libc free(). String arrays * Free the data the library returns with libc free(). String arrays
* are NULL terminated, and you need to free the array itself in * are NULL terminated, and you need to free the array itself in
skipping to change at line 54 skipping to change at line 52
* return 0 or positive. * return 0 or positive.
* *
* These functions access data in /run. This is a virtual file system; * These functions access data in /run. This is a virtual file system;
* therefore, accesses are relatively cheap. * therefore, accesses are relatively cheap.
* *
* See sd-network(3) for more information. * See sd-network(3) for more information.
*/ */
_SD_BEGIN_DECLARATIONS; _SD_BEGIN_DECLARATIONS;
/* Get state from ifindex. /* Get overall operational state
* Possible states: failed, configuring, configured * Possible states: down, up, dormant, carrier, degraded, routable
* Possible return codes: * Possible return codes:
* -ENODATA: networkd is not aware of the link * -ENODATA: networkd is not aware of any links
* -EUNATCH: networkd is not managing this link
* -EBUSY: udev is still processing the link, networkd does not yet know
if it will manage it
*/ */
int sd_network_get_link_state(unsigned index, char **state); int sd_network_get_operational_state(char **state);
/* Get operatinal state from ifindex. /* Get DNS entries for all links. These are string representations of
* Possible states: unknown, dormant, carrier, degraded, routable * IP addresses */
int sd_network_get_dns(char ***dns);
/* Get NTP entries for all links. These are domain names or string
* reperesentations of IP addresses */
int sd_network_get_ntp(char ***ntp);
/* Get the search/routing domains for all links. */
int sd_network_get_domains(char ***domains);
/* Get setup state from ifindex.
* Possible states:
* 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
* configuring: in the process of retrieving configuration or configuring
the link
* configured: link configured successfully
* unmanaged: networkd is not handling the link
* 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_get_link_operational_state(unsigned index, char **state); int sd_network_link_get_setup_state(int ifindex, char **state);
/* Get overall opeartional state /* Get operatinal state from ifindex.
* Possible states: unknown, dormant, carrier, degraded, routable * Possible states:
* off: the device is powered down
* 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
* carrier: the link has a carrier
* degraded: the link has carrier and addresses valid on the local link c
onfigured
* routable: the link has carrier and routable address configured
* Possible return codes: * Possible return codes:
* -ENODATA: networkd is not aware of any links * -ENODATA: networkd is not aware of the link
*/ */
int sd_network_get_operational_state(char **state); int sd_network_link_get_operational_state(int ifindex, char **state);
/* Returns true if link exists and is loopback, and false otherwise */
int sd_network_link_is_loopback(unsigned index);
/* Get DHCPv4 lease from ifindex. */
int sd_network_get_dhcp_lease(unsigned index, sd_dhcp_lease **ret);
/* Returns true if link is configured to respect DNS entries received by DH
CP */
int sd_network_dhcp_use_dns(unsigned index);
/* Returns true if link is configured to respect NTP entries received by DH /* Get DNS entries for a given link. These are string representations of
CP */ * IP addresses */
int sd_network_dhcp_use_ntp(unsigned index); int sd_network_link_get_dns(int ifindex, char ***addr);
/* Get NTP entries for a given link. These are domain names or string
* reperesentations of IP addresses */
int sd_network_link_get_ntp(int ifindex, char ***addr);
/* Get IPv4 DNS entries statically configured for the link */ /* Indicates whether or not LLMNR should be enabled for the link
int sd_network_get_dns(unsigned index, struct in_addr **addr, size_t *addr_ * Possible levels of support: yes, no, resolve
size); * Possible return codes:
* -ENODATA: networkd is not aware of the link*/
/* Get IPv4 NTP entries statically configured for the link */ int sd_network_link_get_llmnr(int ifindex, char **llmnr);
int sd_network_get_ntp(unsigned index, struct in_addr **addr, size_t *addr_
size);
/* Get IPv6 DNS entries statically configured for the link */
int sd_network_get_dns6(unsigned index, struct in6_addr **addr, size_t *add
r_size);
/* Get IPv6 NTP entries statically configured for the link */ /* Get the DNS domain names for a given link. */
int sd_network_get_ntp6(unsigned index, struct in6_addr **addr, size_t *add int sd_network_link_get_domains(int ifindex, char ***domains);
r_size);
/* Get all network interfaces' indices, and store them in *indices. Returns /* Returns whether or not domains that don't match any link should be resol
* the number of indices. If indices is NULL, only returns the number of in ved
dices. */ * on this link. 1 for yes, 0 for no and negative value for error */
int sd_network_get_ifindices(unsigned **indices); int sd_network_link_get_wildcard_domain(int ifindex);
/* Monitor object */ /* Monitor object */
typedef struct sd_network_monitor sd_network_monitor; typedef struct sd_network_monitor sd_network_monitor;
/* Create a new monitor. Category must be NULL, "links" or "leases". */ /* Create a new monitor. Category must be NULL, "links" or "leases". */
int sd_network_monitor_new(const char *category, sd_network_monitor **ret); int sd_network_monitor_new(sd_network_monitor **ret, const char *category);
/* Destroys the passed monitor. Returns NULL. */ /* Destroys the passed monitor. Returns NULL. */
sd_network_monitor* sd_network_monitor_unref(sd_network_monitor *m); sd_network_monitor* sd_network_monitor_unref(sd_network_monitor *m);
/* Flushes the monitor */ /* Flushes the monitor */
int sd_network_monitor_flush(sd_network_monitor *m); int sd_network_monitor_flush(sd_network_monitor *m);
/* Get FD from monitor */ /* Get FD from monitor */
int sd_network_monitor_get_fd(sd_network_monitor *m); int sd_network_monitor_get_fd(sd_network_monitor *m);
 End of changes. 14 change blocks. 
48 lines changed or deleted 58 lines changed or added


 sd-rtnl.h   sd-rtnl.h 
skipping to change at line 70 skipping to change at line 70
int sd_rtnl_flush(sd_rtnl *nl); int sd_rtnl_flush(sd_rtnl *nl);
int sd_rtnl_add_match(sd_rtnl *nl, uint16_t match, sd_rtnl_message_handler_ t c, void *userdata); int sd_rtnl_add_match(sd_rtnl *nl, uint16_t match, sd_rtnl_message_handler_ t c, void *userdata);
int sd_rtnl_remove_match(sd_rtnl *nl, uint16_t match, sd_rtnl_message_handl er_t c, void *userdata); int sd_rtnl_remove_match(sd_rtnl *nl, uint16_t match, sd_rtnl_message_handl er_t c, void *userdata);
int sd_rtnl_attach_event(sd_rtnl *nl, sd_event *e, int priority); int sd_rtnl_attach_event(sd_rtnl *nl, sd_event *e, int priority);
int sd_rtnl_detach_event(sd_rtnl *nl); int sd_rtnl_detach_event(sd_rtnl *nl);
/* messages */ /* messages */
int sd_rtnl_message_new_link(sd_rtnl *rtnl, sd_rtnl_message **ret, uint16_t msg_type, int index); int sd_rtnl_message_new_link(sd_rtnl *rtnl, sd_rtnl_message **ret, uint16_t msg_type, int index);
int sd_rtnl_message_new_addr_update(sd_rtnl *rtnl, sd_rtnl_message **ret, i nt index, unsigned char family); int sd_rtnl_message_new_addr_update(sd_rtnl *rtnl, sd_rtnl_message **ret, i nt index, int family);
int sd_rtnl_message_new_addr(sd_rtnl *rtnl, sd_rtnl_message **ret, uint16_t msg_type, int index, int sd_rtnl_message_new_addr(sd_rtnl *rtnl, sd_rtnl_message **ret, uint16_t msg_type, int index,
unsigned char family); int family);
int sd_rtnl_message_new_route(sd_rtnl *rtnl, sd_rtnl_message **ret, uint16_ t nlmsg_type, int sd_rtnl_message_new_route(sd_rtnl *rtnl, sd_rtnl_message **ret, uint16_ t nlmsg_type,
unsigned char rtm_family); int rtm_family, unsigned char rtm_protocol);
sd_rtnl_message *sd_rtnl_message_ref(sd_rtnl_message *m); sd_rtnl_message *sd_rtnl_message_ref(sd_rtnl_message *m);
sd_rtnl_message *sd_rtnl_message_unref(sd_rtnl_message *m); sd_rtnl_message *sd_rtnl_message_unref(sd_rtnl_message *m);
int sd_rtnl_message_request_dump(sd_rtnl_message *m, int dump); int sd_rtnl_message_request_dump(sd_rtnl_message *m, int dump);
int sd_rtnl_message_get_errno(sd_rtnl_message *m); int sd_rtnl_message_get_errno(sd_rtnl_message *m);
int sd_rtnl_message_get_type(sd_rtnl_message *m, uint16_t *type); int sd_rtnl_message_get_type(sd_rtnl_message *m, uint16_t *type);
int sd_rtnl_message_is_broadcast(sd_rtnl_message *m); int sd_rtnl_message_is_broadcast(sd_rtnl_message *m);
int sd_rtnl_message_addr_set_prefixlen(sd_rtnl_message *m, unsigned char pr efixlen); int sd_rtnl_message_addr_set_prefixlen(sd_rtnl_message *m, unsigned char pr efixlen);
int sd_rtnl_message_addr_set_scope(sd_rtnl_message *m, unsigned char scope) ; int sd_rtnl_message_addr_set_scope(sd_rtnl_message *m, unsigned char scope) ;
int sd_rtnl_message_addr_set_flags(sd_rtnl_message *m, unsigned char flags) ; int sd_rtnl_message_addr_set_flags(sd_rtnl_message *m, unsigned char flags) ;
int sd_rtnl_message_addr_get_family(sd_rtnl_message *m, unsigned char *fami ly); int sd_rtnl_message_addr_get_family(sd_rtnl_message *m, int *family);
int sd_rtnl_message_addr_get_prefixlen(sd_rtnl_message *m, unsigned char *p refixlen); int sd_rtnl_message_addr_get_prefixlen(sd_rtnl_message *m, unsigned char *p refixlen);
int sd_rtnl_message_addr_get_scope(sd_rtnl_message *m, unsigned char *scope ); int sd_rtnl_message_addr_get_scope(sd_rtnl_message *m, unsigned char *scope );
int sd_rtnl_message_addr_get_flags(sd_rtnl_message *m, unsigned char *flags ); int sd_rtnl_message_addr_get_flags(sd_rtnl_message *m, unsigned char *flags );
int sd_rtnl_message_addr_get_ifindex(sd_rtnl_message *m, int *ifindex); int sd_rtnl_message_addr_get_ifindex(sd_rtnl_message *m, int *ifindex);
int sd_rtnl_message_link_set_flags(sd_rtnl_message *m, unsigned flags, unsi gned change); int sd_rtnl_message_link_set_flags(sd_rtnl_message *m, unsigned flags, unsi gned change);
int sd_rtnl_message_link_set_type(sd_rtnl_message *m, unsigned type); int sd_rtnl_message_link_set_type(sd_rtnl_message *m, unsigned type);
int sd_rtnl_message_link_get_ifindex(sd_rtnl_message *m, int *ifindex); int sd_rtnl_message_link_get_ifindex(sd_rtnl_message *m, int *ifindex);
int sd_rtnl_message_link_get_flags(sd_rtnl_message *m, unsigned *flags); int sd_rtnl_message_link_get_flags(sd_rtnl_message *m, unsigned *flags);
int sd_rtnl_message_link_get_type(sd_rtnl_message *m, unsigned *type);
int sd_rtnl_message_route_set_dst_prefixlen(sd_rtnl_message *m, unsigned ch ar prefixlen); int sd_rtnl_message_route_set_dst_prefixlen(sd_rtnl_message *m, unsigned ch ar prefixlen);
int sd_rtnl_message_route_set_scope(sd_rtnl_message *m, unsigned char scope ); int sd_rtnl_message_route_set_scope(sd_rtnl_message *m, unsigned char scope );
int sd_rtnl_message_append_string(sd_rtnl_message *m, unsigned short type, const char *data); int sd_rtnl_message_append_string(sd_rtnl_message *m, unsigned short type, const char *data);
int sd_rtnl_message_append_u8(sd_rtnl_message *m, unsigned short type, uint 8_t data); int sd_rtnl_message_append_u8(sd_rtnl_message *m, unsigned short type, uint 8_t data);
int sd_rtnl_message_append_u16(sd_rtnl_message *m, unsigned short type, uin t16_t data); int sd_rtnl_message_append_u16(sd_rtnl_message *m, unsigned short type, uin t16_t data);
int sd_rtnl_message_append_u32(sd_rtnl_message *m, unsigned short type, uin t32_t data); int sd_rtnl_message_append_u32(sd_rtnl_message *m, unsigned short type, uin t32_t data);
int sd_rtnl_message_append_in_addr(sd_rtnl_message *m, unsigned short type, const struct in_addr *data); int sd_rtnl_message_append_in_addr(sd_rtnl_message *m, unsigned short type, const struct in_addr *data);
int sd_rtnl_message_append_in6_addr(sd_rtnl_message *m, unsigned short type , const struct in6_addr *data); int sd_rtnl_message_append_in6_addr(sd_rtnl_message *m, unsigned short type , const struct in6_addr *data);
int sd_rtnl_message_append_ether_addr(sd_rtnl_message *m, unsigned short ty pe, const struct ether_addr *data); int sd_rtnl_message_append_ether_addr(sd_rtnl_message *m, unsigned short ty pe, const struct ether_addr *data);
int sd_rtnl_message_append_cache_info(sd_rtnl_message *m, unsigned short ty pe, const struct ifa_cacheinfo *info); int sd_rtnl_message_append_cache_info(sd_rtnl_message *m, unsigned short ty pe, const struct ifa_cacheinfo *info);
int sd_rtnl_message_open_container(sd_rtnl_message *m, unsigned short type) ; int sd_rtnl_message_open_container(sd_rtnl_message *m, unsigned short type) ;
int sd_rtnl_message_open_container_union(sd_rtnl_message *m, unsigned short type, const char *key); int sd_rtnl_message_open_container_union(sd_rtnl_message *m, unsigned short type, const char *key);
int sd_rtnl_message_close_container(sd_rtnl_message *m); int sd_rtnl_message_close_container(sd_rtnl_message *m);
int sd_rtnl_message_read_string(sd_rtnl_message *m, unsigned short type, ch ar **data); int sd_rtnl_message_read_string(sd_rtnl_message *m, unsigned short type, co nst char **data);
int sd_rtnl_message_read_u8(sd_rtnl_message *m, unsigned short type, uint8_ t *data); int sd_rtnl_message_read_u8(sd_rtnl_message *m, unsigned short type, uint8_ t *data);
int sd_rtnl_message_read_u16(sd_rtnl_message *m, unsigned short type, uint1 6_t *data); int sd_rtnl_message_read_u16(sd_rtnl_message *m, unsigned short type, uint1 6_t *data);
int sd_rtnl_message_read_u32(sd_rtnl_message *m, unsigned short type, uint3 2_t *data); int sd_rtnl_message_read_u32(sd_rtnl_message *m, unsigned short type, uint3 2_t *data);
int sd_rtnl_message_read_ether_addr(sd_rtnl_message *m, unsigned short type , struct ether_addr *data); int sd_rtnl_message_read_ether_addr(sd_rtnl_message *m, unsigned short type , struct ether_addr *data);
int sd_rtnl_message_read_cache_info(sd_rtnl_message *m, unsigned short type , struct ifa_cacheinfo *info); int sd_rtnl_message_read_cache_info(sd_rtnl_message *m, unsigned short type , struct ifa_cacheinfo *info);
int sd_rtnl_message_read_in_addr(sd_rtnl_message *m, unsigned short type, s truct in_addr *data); int sd_rtnl_message_read_in_addr(sd_rtnl_message *m, unsigned short type, s truct in_addr *data);
int sd_rtnl_message_read_in6_addr(sd_rtnl_message *m, unsigned short type, struct in6_addr *data); int sd_rtnl_message_read_in6_addr(sd_rtnl_message *m, unsigned short type, struct in6_addr *data);
int sd_rtnl_message_enter_container(sd_rtnl_message *m, unsigned short type ); int sd_rtnl_message_enter_container(sd_rtnl_message *m, unsigned short type );
int sd_rtnl_message_exit_container(sd_rtnl_message *m); int sd_rtnl_message_exit_container(sd_rtnl_message *m);
 End of changes. 6 change blocks. 
5 lines changed or deleted 6 lines changed or added


 service.h   service.h 
skipping to change at line 185 skipping to change at line 185
bool bus_name_good:1; bool bus_name_good:1;
bool forbid_restart:1; bool forbid_restart:1;
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;
FailureAction failure_action; FailureAction failure_action;
RateLimit start_limit; RateLimit start_limit;
FailureAction start_limit_action; FailureAction start_limit_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;
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 set.h   set.h 
skipping to change at line 44 skipping to change at line 44
Set *set_new(hash_func_t hash_func, compare_func_t compare_func); Set *set_new(hash_func_t hash_func, compare_func_t compare_func);
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, hash_func_t hash_func, compare_func_t com pare_func);
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_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); void 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);
 End of changes. 1 change blocks. 
0 lines changed or deleted 2 lines changed or added


 socket-util.h   socket-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 <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/ether.h>
#include <sys/un.h> #include <sys/un.h>
#include <asm/types.h> #include <asm/types.h>
#include <linux/netlink.h> #include <linux/netlink.h>
#include <linux/if_packet.h> #include <linux/if_packet.h>
#include "macro.h" #include "macro.h"
#include "util.h" #include "util.h"
union sockaddr_union { union sockaddr_union {
struct sockaddr sa; struct sockaddr sa;
struct sockaddr_in in; struct sockaddr_in in;
struct sockaddr_in6 in6; struct sockaddr_in6 in6;
struct sockaddr_un un; struct sockaddr_un un;
struct sockaddr_nl nl; struct sockaddr_nl nl;
struct sockaddr_storage storage; struct sockaddr_storage storage;
struct sockaddr_ll ll; struct sockaddr_ll ll;
}; };
union in_addr_union {
struct in_addr in;
struct in6_addr in6;
};
typedef struct SocketAddress { typedef struct SocketAddress {
union sockaddr_union sockaddr; union sockaddr_union sockaddr;
/* We store the size here explicitly due to the weird /* We store the size here explicitly due to the weird
* sockaddr_un semantics for abstract sockets */ * sockaddr_un semantics for abstract sockets */
socklen_t size; socklen_t size;
/* Socket type, i.e. SOCK_STREAM, SOCK_DGRAM, ... */ /* Socket type, i.e. SOCK_STREAM, SOCK_DGRAM, ... */
int type; int type;
skipping to change at line 109 skipping to change at line 105
bool socket_address_equal(const SocketAddress *a, const SocketAddress *b) _ pure_; bool socket_address_equal(const SocketAddress *a, const SocketAddress *b) _ pure_;
const char* socket_address_get_path(const SocketAddress *a); const char* socket_address_get_path(const SocketAddress *a);
bool socket_ipv6_is_supported(void); bool socket_ipv6_is_supported(void);
int sockaddr_pretty(const struct sockaddr *_sa, socklen_t salen, bool trans late_ipv6, char **ret); int sockaddr_pretty(const struct sockaddr *_sa, socklen_t salen, bool trans late_ipv6, char **ret);
int getpeername_pretty(int fd, char **ret); int getpeername_pretty(int fd, char **ret);
int getsockname_pretty(int fd, char **ret); int getsockname_pretty(int fd, char **ret);
int socknameinfo_pretty(union sockaddr_union *sa, socklen_t salen, char **_
ret);
int getnameinfo_pretty(int fd, char **ret);
const char* socket_address_bind_ipv6_only_to_string(SocketAddressBindIPv6On ly b) _const_; const char* socket_address_bind_ipv6_only_to_string(SocketAddressBindIPv6On ly b) _const_;
SocketAddressBindIPv6Only socket_address_bind_ipv6_only_from_string(const c har *s) _pure_; SocketAddressBindIPv6Only socket_address_bind_ipv6_only_from_string(const c har *s) _pure_;
int netlink_family_to_string_alloc(int b, char **s); int netlink_family_to_string_alloc(int b, char **s);
int netlink_family_from_string(const char *s) _pure_; int netlink_family_from_string(const char *s) _pure_;
int in_addr_null(unsigned family, union in_addr_union *u); bool sockaddr_equal(const union sockaddr_union *a, const union sockaddr_uni
int in_addr_equal(unsigned family, union in_addr_union *a, union in_addr_un on *b);
ion *b);
int in_addr_prefix_intersect(unsigned family, const union in_addr_union *a, #define ETHER_ADDR_TO_STRING_MAX (3*6)
unsigned aprefixlen, const union in_addr_union *b, unsigned bprefixlen);
int in_addr_prefix_next(unsigned family, union in_addr_union *u, unsigned p char* ether_addr_to_string(const struct ether_addr *addr, char buffer[ETHER
refixlen); _ADDR_TO_STRING_MAX]);
int in_addr_to_string(unsigned family, const union in_addr_union *u, char *
*ret);
int in_addr_from_string(unsigned family, const char *s, union in_addr_union
*ret);
 End of changes. 4 change blocks. 
5 lines changed or deleted 5 lines changed or added


 socket.h   socket.h 
skipping to change at line 104 skipping to change at line 104
struct Socket { struct Socket {
Unit meta; Unit meta;
LIST_HEAD(SocketPort, ports); LIST_HEAD(SocketPort, ports);
unsigned n_accepted; unsigned n_accepted;
unsigned n_connections; unsigned n_connections;
unsigned max_connections; unsigned max_connections;
unsigned backlog; unsigned backlog;
unsigned keep_alive_cnt;
usec_t timeout_usec; usec_t timeout_usec;
usec_t keep_alive_time;
usec_t keep_alive_interval;
usec_t defer_accept;
ExecCommand* exec_command[_SOCKET_EXEC_COMMAND_MAX]; ExecCommand* exec_command[_SOCKET_EXEC_COMMAND_MAX];
ExecContext exec_context; ExecContext exec_context;
KillContext kill_context; KillContext kill_context;
CGroupContext cgroup_context; CGroupContext cgroup_context;
ExecRuntime *exec_runtime; ExecRuntime *exec_runtime;
/* For Accept=no sockets refers to the one service we'll /* For Accept=no sockets refers to the one service we'll
activate. For Accept=yes sockets is either NULL, or filled activate. For Accept=yes sockets is either NULL, or filled
when the next service we spawn. */ when the next service we spawn. */
skipping to change at line 137 skipping to change at line 141
SocketResult result; SocketResult result;
char **symlinks; char **symlinks;
bool accept; bool accept;
bool remove_on_stop; bool remove_on_stop;
/* Socket options */ /* Socket options */
bool keep_alive; bool keep_alive;
bool no_delay;
bool free_bind; bool free_bind;
bool transparent; bool transparent;
bool broadcast; bool broadcast;
bool pass_cred; bool pass_cred;
bool pass_sec; bool pass_sec;
/* Only for INET6 sockets: issue IPV6_V6ONLY sockopt */ /* Only for INET6 sockets: issue IPV6_V6ONLY sockopt */
SocketAddressBindIPv6Only bind_ipv6_only; SocketAddressBindIPv6Only bind_ipv6_only;
int priority; int priority;
skipping to change at line 186 skipping to change at line 191
const char* socket_state_to_string(SocketState i) _const_; const char* socket_state_to_string(SocketState i) _const_;
SocketState socket_state_from_string(const char *s) _pure_; SocketState socket_state_from_string(const char *s) _pure_;
const char* socket_exec_command_to_string(SocketExecCommand i) _const_; const char* socket_exec_command_to_string(SocketExecCommand i) _const_;
SocketExecCommand socket_exec_command_from_string(const char *s) _pure_; SocketExecCommand socket_exec_command_from_string(const char *s) _pure_;
const char* socket_result_to_string(SocketResult i) _const_; const char* socket_result_to_string(SocketResult i) _const_;
SocketResult socket_result_from_string(const char *s) _pure_; SocketResult socket_result_from_string(const char *s) _pure_;
const char* socket_port_type_to_string(SocketPort *p) _pure_; const char* socket_port_type_to_string(SocketPort *p) _pure_;
int socket_instantiate_service(Socket *s);
 End of changes. 4 change blocks. 
0 lines changed or deleted 5 lines changed or added


 special.h   special.h 
skipping to change at line 60 skipping to change at line 60
#define SPECIAL_TIMERS_TARGET "timers.target" #define SPECIAL_TIMERS_TARGET "timers.target"
#define SPECIAL_PATHS_TARGET "paths.target" #define SPECIAL_PATHS_TARGET "paths.target"
#define SPECIAL_LOCAL_FS_TARGET "local-fs.target" #define SPECIAL_LOCAL_FS_TARGET "local-fs.target"
#define SPECIAL_LOCAL_FS_PRE_TARGET "local-fs-pre.target" #define SPECIAL_LOCAL_FS_PRE_TARGET "local-fs-pre.target"
#define SPECIAL_INITRD_FS_TARGET "initrd-fs.target" #define SPECIAL_INITRD_FS_TARGET "initrd-fs.target"
#define SPECIAL_INITRD_ROOT_FS_TARGET "initrd-root-fs.target" #define SPECIAL_INITRD_ROOT_FS_TARGET "initrd-root-fs.target"
#define SPECIAL_REMOTE_FS_TARGET "remote-fs.target" /* LSB's $remote_ fs */ #define SPECIAL_REMOTE_FS_TARGET "remote-fs.target" /* LSB's $remote_ fs */
#define SPECIAL_REMOTE_FS_PRE_TARGET "remote-fs-pre.target" #define SPECIAL_REMOTE_FS_PRE_TARGET "remote-fs-pre.target"
#define SPECIAL_SWAP_TARGET "swap.target" #define SPECIAL_SWAP_TARGET "swap.target"
#define SPECIAL_NETWORK_ONLINE_TARGET "network-online.target" #define SPECIAL_NETWORK_ONLINE_TARGET "network-online.target"
#define SPECIAL_TIME_SYNC_TARGET "time-sync.target" /* LSB's $time */
#define SPECIAL_BASIC_TARGET "basic.target" #define SPECIAL_BASIC_TARGET "basic.target"
/* LSB compatibility */ /* LSB compatibility */
#define SPECIAL_NETWORK_TARGET "network.target" /* LSB's $network */ #define SPECIAL_NETWORK_TARGET "network.target" /* LSB's $network */
#define SPECIAL_NSS_LOOKUP_TARGET "nss-lookup.target" /* LSB's $named * / #define SPECIAL_NSS_LOOKUP_TARGET "nss-lookup.target" /* LSB's $named * /
#define SPECIAL_RPCBIND_TARGET "rpcbind.target" /* LSB's $portmap */ #define SPECIAL_RPCBIND_TARGET "rpcbind.target" /* LSB's $portmap */
#define SPECIAL_TIME_SYNC_TARGET "time-sync.target" /* LSB's $time */
/* /*
* Rules regarding adding further high level targets like the above: * Rules regarding adding further high level targets like the above:
* *
* - Be conservative, only add more of these when we really need * - Be conservative, only add more of these when we really need
* them. We need strong usecases for further additions. * them. We need strong usecases for further additions.
* *
* - When there can be multiple implementations running side-by-side, * - When there can be multiple implementations running side-by-side,
* it needs to be a .target unit which can pull in all * it needs to be a .target unit which can pull in all
* implementations. * implementations.
 End of changes. 2 change blocks. 
1 lines changed or deleted 1 lines changed or added


 strv.h   strv.h 
skipping to change at line 65 skipping to change at line 65
static inline const char* STRV_IFNOTNULL(const char *x) { static inline const char* STRV_IFNOTNULL(const char *x) {
return x ? x : (const char *) -1; return x ? x : (const char *) -1;
} }
static inline bool strv_isempty(char * const *l) { static inline bool strv_isempty(char * const *l) {
return !l || !*l; return !l || !*l;
} }
char **strv_split(const char *s, const char *separator); char **strv_split(const char *s, const char *separator);
char **strv_split_quoted(const char *s); int strv_split_quoted(char ***t, const char *s);
char **strv_split_newlines(const char *s); char **strv_split_newlines(const char *s);
char *strv_join(char **l, const char *separator); char *strv_join(char **l, const char *separator);
char *strv_join_quoted(char **l); char *strv_join_quoted(char **l);
char **strv_parse_nulstr(const char *s, size_t l); char **strv_parse_nulstr(const char *s, size_t l);
char **strv_split_nulstr(const char *s); char **strv_split_nulstr(const char *s);
bool strv_overlap(char **a, char **b) _pure_; bool strv_overlap(char **a, char **b) _pure_;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 test-tables.h   test-tables.h 
skipping to change at line 52 skipping to change at line 52
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 ? if (i >= 0 && i < size ?
sparse ? rev != i && rev != -1 : val == NULL || rev != i : sparse ? rev != i && rev != -1 : val == NULL || rev != i :
val != NULL || rev != -1) val != NULL || rev != -1)
exit(EXIT_FAILURE); 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) \
_test_table(STRINGIFY(lower), lower##_to_string, lower##_from_strin
g, _##upper##_MAX, true)
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added


 time-util.h   time-util.h 
skipping to change at line 40 skipping to change at line 40
#define NSEC_FMT "%" PRIu64 #define NSEC_FMT "%" PRIu64
#define USEC_FMT "%" PRIu64 #define USEC_FMT "%" PRIu64
#include "macro.h" #include "macro.h"
typedef struct dual_timestamp { typedef struct dual_timestamp {
usec_t realtime; usec_t realtime;
usec_t monotonic; usec_t monotonic;
} dual_timestamp; } dual_timestamp;
#define MSEC_PER_SEC ((usec_t) 1000ULL) #define USEC_INFINITY ((usec_t) -1)
#define NSEC_INFINITY ((nsec_t) -1)
#define MSEC_PER_SEC 1000ULL
#define USEC_PER_SEC ((usec_t) 1000000ULL) #define USEC_PER_SEC ((usec_t) 1000000ULL)
#define USEC_PER_MSEC ((usec_t) 1000ULL) #define USEC_PER_MSEC ((usec_t) 1000ULL)
#define NSEC_PER_SEC ((usec_t) 1000000000ULL) #define NSEC_PER_SEC ((nsec_t) 1000000000ULL)
#define NSEC_PER_MSEC ((usec_t) 1000000ULL) #define NSEC_PER_MSEC ((nsec_t) 1000000ULL)
#define NSEC_PER_USEC ((usec_t) 1000ULL) #define NSEC_PER_USEC ((nsec_t) 1000ULL)
#define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC)) #define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC))
#define NSEC_PER_MINUTE ((usec_t) (60ULL*NSEC_PER_SEC)) #define NSEC_PER_MINUTE ((nsec_t) (60ULL*NSEC_PER_SEC))
#define USEC_PER_HOUR ((usec_t) (60ULL*USEC_PER_MINUTE)) #define USEC_PER_HOUR ((usec_t) (60ULL*USEC_PER_MINUTE))
#define NSEC_PER_HOUR ((usec_t) (60ULL*NSEC_PER_MINUTE)) #define NSEC_PER_HOUR ((nsec_t) (60ULL*NSEC_PER_MINUTE))
#define USEC_PER_DAY ((usec_t) (24ULL*USEC_PER_HOUR)) #define USEC_PER_DAY ((usec_t) (24ULL*USEC_PER_HOUR))
#define NSEC_PER_DAY ((usec_t) (24ULL*NSEC_PER_HOUR)) #define NSEC_PER_DAY ((nsec_t) (24ULL*NSEC_PER_HOUR))
#define USEC_PER_WEEK ((usec_t) (7ULL*USEC_PER_DAY)) #define USEC_PER_WEEK ((usec_t) (7ULL*USEC_PER_DAY))
#define NSEC_PER_WEEK ((usec_t) (7ULL*NSEC_PER_DAY)) #define NSEC_PER_WEEK ((nsec_t) (7ULL*NSEC_PER_DAY))
#define USEC_PER_MONTH ((usec_t) (2629800ULL*USEC_PER_SEC)) #define USEC_PER_MONTH ((usec_t) (2629800ULL*USEC_PER_SEC))
#define NSEC_PER_MONTH ((usec_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 ((usec_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 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_t) -1) || return ((ts->realtime > 0 && ts->realtime != USEC_INFINITY) ||
(ts->monotonic > 0 && ts->monotonic != (usec_t) -1)); (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_us(char *buf, size_t l, usec_t t); char *format_timestamp_us(char *buf, size_t l, usec_t t);
skipping to change at line 98 skipping to change at line 101
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);
bool ntp_synced(void); bool ntp_synced(void);
int get_timezones(char ***l);
bool timezone_is_valid(const char *name);
clockid_t clock_boottime_or_monotonic(void);
 End of changes. 10 change blocks. 
12 lines changed or deleted 15 lines changed or added


 udev.h   udev.h 
skipping to change at line 46 skipping to change at line 46
struct udev_device *dev_db; struct udev_device *dev_db;
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;
usec_t timeout_usec;
int fd_signal; int fd_signal;
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;
skipping to change at line 75 skipping to change at line 74
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 * event, const sigset_t *sigmask); int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event * event, usec_t timeout_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,
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, struct udev_rules * void udev_event_execute_rules(struct udev_event *event, usec_t timeout_usec
rules, const sigset_t *sigset); , struct udev_rules *rules, const sigset_t *sigset);
void udev_event_execute_run(struct udev_event *event, const sigset_t *sigse void udev_event_execute_run(struct udev_event *event, usec_t timeout_usec,
t); 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 */
 End of changes. 4 change blocks. 
6 lines changed or deleted 6 lines changed or added


 util.h   util.h 
skipping to change at line 72 skipping to change at line 72
#if SIZEOF_GID_T == 4 #if SIZEOF_GID_T == 4
# define GID_FMT "%" PRIu32 # define GID_FMT "%" PRIu32
#elif SIZEOF_GID_T == 2 #elif SIZEOF_GID_T == 2
# define GID_FMT "%" PRIu16 # define GID_FMT "%" PRIu16
#else #else
# error Unknown gid_t size # error Unknown gid_t size
#endif #endif
#if SIZEOF_TIME_T == 8 #if SIZEOF_TIME_T == 8
# define PRI_TIME PRIu64 # define PRI_TIME PRIu64
#elif SIZEOF_GID_T == 4 #elif SIZEOF_TIME_T == 4
# define PRI_TIME PRIu32 # define PRI_TIME PRIu32
#else #else
# error Unknown time_t size # error Unknown time_t size
#endif #endif
#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
skipping to change at line 97 skipping to change at line 97
#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? */
/* must be escaped outside and inside double-quotes */
#define SHELL_NEED_ESCAPE "\"\\`$"
/* can be escaped or double-quoted */
#define SHELL_NEED_QUOTES SHELL_NEED_ESCAPE GLOB_CHARS "'()<>|&;"
#define FORMAT_BYTES_MAX 8 #define FORMAT_BYTES_MAX 8
#define ANSI_HIGHLIGHT_ON "\x1B[1;39m" #define ANSI_HIGHLIGHT_ON "\x1B[1;39m"
#define ANSI_RED_ON "\x1B[31m" #define ANSI_RED_ON "\x1B[31m"
#define ANSI_HIGHLIGHT_RED_ON "\x1B[1;31m" #define ANSI_HIGHLIGHT_RED_ON "\x1B[1;31m"
#define ANSI_GREEN_ON "\x1B[32m" #define ANSI_GREEN_ON "\x1B[32m"
#define ANSI_HIGHLIGHT_GREEN_ON "\x1B[1;32m" #define ANSI_HIGHLIGHT_GREEN_ON "\x1B[1;32m"
#define ANSI_HIGHLIGHT_YELLOW_ON "\x1B[1;33m" #define ANSI_HIGHLIGHT_YELLOW_ON "\x1B[1;33m"
#define ANSI_HIGHLIGHT_BLUE_ON "\x1B[1;34m" #define ANSI_HIGHLIGHT_BLUE_ON "\x1B[1;34m"
#define ANSI_HIGHLIGHT_OFF "\x1B[0m" #define ANSI_HIGHLIGHT_OFF "\x1B[0m"
skipping to change at line 125 skipping to change at line 131
#define strncaseeq(a, b, n) (strncasecmp((a), (b), (n)) == 0) #define strncaseeq(a, b, n) (strncasecmp((a), (b), (n)) == 0)
bool streq_ptr(const char *a, const char *b) _pure_; bool streq_ptr(const char *a, const char *b) _pure_;
#define new(t, n) ((t*) malloc_multiply(sizeof(t), (n))) #define new(t, n) ((t*) malloc_multiply(sizeof(t), (n)))
#define new0(t, n) ((t*) calloc((n), sizeof(t))) #define new0(t, n) ((t*) calloc((n), sizeof(t)))
#define newa(t, n) ((t*) alloca(sizeof(t)*(n))) #define newa(t, n) ((t*) alloca(sizeof(t)*(n)))
#define newa0(t, n) ((t*) alloca0(sizeof(t)*(n)))
#define newdup(t, p, n) ((t*) memdup_multiply(p, sizeof(t), (n))) #define newdup(t, p, n) ((t*) memdup_multiply(p, sizeof(t), (n)))
#define malloc0(n) (calloc((n), 1)) #define malloc0(n) (calloc((n), 1))
static inline const char* yes_no(bool b) { static inline const char* yes_no(bool b) {
return b ? "yes" : "no"; return b ? "yes" : "no";
} }
static inline const char* true_false(bool b) { static inline const char* true_false(bool b) {
return b ? "true" : "false"; return b ? "true" : "false";
skipping to change at line 167 skipping to change at line 175
} }
static inline const char *startswith_no_case(const char *s, const char *pre fix) { static inline const char *startswith_no_case(const char *s, const char *pre fix) {
if (strncasecmp(s, prefix, strlen(prefix)) == 0) if (strncasecmp(s, prefix, strlen(prefix)) == 0)
return s + strlen(prefix); return s + strlen(prefix);
return NULL; return NULL;
} }
char *endswith(const char *s, const char *postfix) _pure_; char *endswith(const char *s, const char *postfix) _pure_;
bool 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[]);
void close_many(const int fds[], unsigned n_fd); void close_many(const int fds[], unsigned n_fd);
int parse_size(const char *t, off_t base, off_t *size); int parse_size(const char *t, off_t base, off_t *size);
int parse_boolean(const char *v) _pure_; int parse_boolean(const char *v) _pure_;
skipping to change at line 190 skipping to change at line 198
#define parse_gid(s, ret_uid) parse_uid(s, ret_uid) #define parse_gid(s, ret_uid) parse_uid(s, ret_uid)
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);
#if __WORDSIZE == 32 #if __WORDSIZE == 32
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
skipping to change at line 230 skipping to change at line 240
static inline int safe_atou64(const char *s, uint64_t *ret_u) { static inline int safe_atou64(const char *s, uint64_t *ret_u) {
assert_cc(sizeof(uint64_t) == sizeof(unsigned long long)); assert_cc(sizeof(uint64_t) == sizeof(unsigned long long));
return safe_atollu(s, (unsigned long long*) ret_u); return safe_atollu(s, (unsigned long long*) ret_u);
} }
static inline int safe_atoi64(const char *s, int64_t *ret_i) { static inline int safe_atoi64(const char *s, int64_t *ret_i) {
assert_cc(sizeof(int64_t) == sizeof(long long int)); assert_cc(sizeof(int64_t) == sizeof(long long int));
return safe_atolli(s, (long long int*) ret_i); return safe_atolli(s, (long long int*) ret_i);
} }
char *split(const char *c, size_t *l, const char *separator, bool quoted, c har **state); const char* split(const char **state, size_t *l, const char *separator, boo l quoted);
#define FOREACH_WORD(word, length, s, state) \ #define FOREACH_WORD(word, length, s, state) \
_FOREACH_WORD(word, length, s, WHITESPACE, false, state) _FOREACH_WORD(word, length, s, WHITESPACE, false, state)
#define FOREACH_WORD_SEPARATOR(word, length, s, separator, state) \ #define FOREACH_WORD_SEPARATOR(word, length, s, separator, state) \
_FOREACH_WORD(word, length, s, separator, false, state) _FOREACH_WORD(word, length, s, separator, false, state)
#define FOREACH_WORD_QUOTED(word, length, s, state) \ #define FOREACH_WORD_QUOTED(word, length, s, state) \
_FOREACH_WORD(word, length, s, WHITESPACE, true, state) _FOREACH_WORD(word, length, s, WHITESPACE, true, state)
#define FOREACH_WORD_SEPARATOR_QUOTED(word, length, s, separator, state)
\
_FOREACH_WORD(word, length, s, separator, true, state)
#define _FOREACH_WORD(word, length, s, separator, quoted, state) \ #define _FOREACH_WORD(word, length, s, separator, quoted, state) \
for ((state) = NULL, (word) = split((s), &(length), (separator), (q uoted), &(state)); (word); (word) = split((s), &(length), (separator), (quo ted), &(state))) for ((state) = (s), (word) = split(&(state), &(length), (separator) , (quoted)); (word); (word) = split(&(state), &(length), (separator), (quot ed)))
pid_t get_parent_of_pid(pid_t pid, pid_t *ppid); pid_t get_parent_of_pid(pid_t pid, pid_t *ppid);
int get_starttime_of_pid(pid_t pid, unsigned long long *st); int get_starttime_of_pid(pid_t pid, unsigned long long *st);
char *strappend(const char *s, const char *suffix); char *strappend(const char *s, const char *suffix);
char *strnappend(const char *s, const char *suffix, size_t length); char *strnappend(const char *s, const char *suffix, size_t length);
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);
skipping to change at line 386 skipping to change at line 393
int fd_nonblock(int fd, bool nonblock); int fd_nonblock(int fd, bool nonblock);
int fd_cloexec(int fd, bool cloexec); int fd_cloexec(int fd, bool cloexec);
int close_all_fds(const int except[], unsigned n_except); int close_all_fds(const int except[], unsigned n_except);
bool fstype_is_network(const char *fstype); bool fstype_is_network(const char *fstype);
int chvt(int vt); int chvt(int vt);
int read_one_char(FILE *f, char *ret, usec_t timeout, bool *need_nl); int read_one_char(FILE *f, char *ret, usec_t timeout, bool *need_nl);
int ask(char *ret, const char *replies, const char *text, ...) _printf_(3, int ask_char(char *ret, const char *replies, const char *text, ...) _printf
4); _(3, 4);
int ask_string(char **ret, const char *text, ...) _printf_(2, 3);
int reset_terminal_fd(int fd, bool switch_to_text); int reset_terminal_fd(int fd, bool switch_to_text);
int reset_terminal(const char *name); int reset_terminal(const char *name);
int open_terminal(const char *name, int mode); int open_terminal(const char *name, int mode);
int acquire_terminal(const char *name, bool fail, bool force, bool ignore_t iocstty_eperm, usec_t timeout); int acquire_terminal(const char *name, bool fail, bool force, bool ignore_t iocstty_eperm, usec_t timeout);
int release_terminal(void); int release_terminal(void);
int flush_fd(int fd); int flush_fd(int fd);
skipping to change at line 496 skipping to change at line 504
char *unquote(const char *s, const char *quotes); char *unquote(const char *s, const char *quotes);
char *normalize_env_assignment(const char *s); char *normalize_env_assignment(const char *s);
int wait_for_terminate(pid_t pid, siginfo_t *status); int wait_for_terminate(pid_t pid, siginfo_t *status);
int wait_for_terminate_and_warn(const char *name, pid_t pid); int wait_for_terminate_and_warn(const char *name, pid_t pid);
noreturn void freeze(void); noreturn void freeze(void);
bool null_or_empty(struct stat *st) _pure_; bool null_or_empty(struct stat *st) _pure_;
int null_or_empty_path(const char *fn); int null_or_empty_path(const char *fn);
int null_or_empty_fd(int fd);
DIR *xopendirat(int dirfd, const char *name, int flags); DIR *xopendirat(int dirfd, const char *name, int flags);
char *fstab_node_to_udev_node(const char *p); char *fstab_node_to_udev_node(const char *p);
char *resolve_dev_console(char **active); char *resolve_dev_console(char **active);
bool tty_is_vc(const char *tty); bool tty_is_vc(const char *tty);
bool tty_is_vc_resolve(const char *tty); bool tty_is_vc_resolve(const char *tty);
bool tty_is_console(const char *tty) _pure_; bool tty_is_console(const char *tty) _pure_;
int vtnr_from_tty(const char *tty); int vtnr_from_tty(const char *tty);
skipping to change at line 696 skipping to change at line 705
_alloc_(2, 3) static inline void *memdup_multiply(const void *p, size_t a, size_t b) { _alloc_(2, 3) static inline void *memdup_multiply(const void *p, size_t a, size_t b) {
if (_unlikely_(b != 0 && a > ((size_t) -1) / b)) if (_unlikely_(b != 0 && a > ((size_t) -1) / b))
return NULL; return NULL;
return memdup(p, a * b); return memdup(p, a * b);
} }
bool filename_is_safe(const char *p) _pure_; bool filename_is_safe(const char *p) _pure_;
bool path_is_safe(const char *p) _pure_; bool path_is_safe(const char *p) _pure_;
bool string_is_safe(const char *p) _pure_; bool string_is_safe(const char *p) _pure_;
bool string_has_cc(const char *p) _pure_; bool string_has_cc(const char *p, const char *ok) _pure_;
/** /**
* Check if a string contains any glob patterns. * Check if a string contains any glob patterns.
*/ */
_pure_ static inline bool string_is_glob(const char *p) { _pure_ static inline bool string_is_glob(const char *p) {
return !!strpbrk(p, GLOB_CHARS); return !!strpbrk(p, GLOB_CHARS);
} }
void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t si ze, void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t si ze,
int (*compar) (const void *, const void *, void *), int (*compar) (const void *, const void *, void *),
skipping to change at line 838 skipping to change at line 847
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 strappenda(a, b) \ #define strappenda(a, ...) \
({ \ ({ \
const char *_a_ = (a), *_b_ = (b); \ int _len = strlen(a); \
char *_c_; \ unsigned _i; \
size_t _x_, _y_; \ char *_d_, *_p_; \
_x_ = strlen(_a_); \ const char *_appendees_[] = { __VA_ARGS__ }; \
_y_ = strlen(_b_); \ for (_i = 0; _i < ELEMENTSOF(_appendees_); _i++) \
_c_ = alloca(_x_ + _y_ + 1); \ _len += strlen(_appendees_[_i]); \
strcpy(stpcpy(_c_, _a_), _b_); \ _d_ = alloca(_len + 1); \
_c_; \ _p_ = stpcpy(_d_, a); \
}) for (_i = 0; _i < ELEMENTSOF(_appendees_); _i++) \
_p_ = stpcpy(_p_, _appendees_[_i]); \
#define strappenda3(a, b, c) \ _d_; \
({ \
const char *_a_ = (a), *_b_ = (b), *_c_ = (c); \
char *_d_; \
size_t _x_, _y_, _z_; \
_x_ = strlen(_a_); \
_y_ = strlen(_b_); \
_z_ = strlen(_c_); \
_d_ = alloca(_x_ + _y_ + _z_ + 1); \
strcpy(stpcpy(stpcpy(_d_, _a_), _b_), _c_); \
_d_; \
}) })
#define procfs_file_alloca(pid, field) \ #define procfs_file_alloca(pid, field) \
({ \ ({ \
pid_t _pid_ = (pid); \ pid_t _pid_ = (pid); \
const char *_r_; \ const char *_r_; \
if (_pid_ == 0) { \ if (_pid_ == 0) { \
_r_ = ("/proc/self/" field); \ _r_ = ("/proc/self/" field); \
} else { \ } else { \
_r_ = alloca(strlen("/proc/") + DECIMAL_STR_MAX(pid _t) + 1 + sizeof(field)); \ _r_ = alloca(strlen("/proc/") + DECIMAL_STR_MAX(pid _t) + 1 + sizeof(field)); \
skipping to change at line 967 skipping to change at line 966
int umount_recursive(const char *target, int flags); int umount_recursive(const char *target, int flags);
int bind_remount_recursive(const char *prefix, bool ro); int bind_remount_recursive(const char *prefix, bool ro);
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 is_symlink(const char *path);
int unquote_first_word(const char **p, char **ret);
int unquote_many_words(const char **p, ...) _sentinel_;
 End of changes. 13 change blocks. 
34 lines changed or deleted 32 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/