[systemd-commits] 30 commits - CODING_STYLE Makefile.am Makefile-man.am man/journald.conf.xml man/libudev.xml man/sd_bus_creds_get_pid.xml man/sd_bus_creds_new_from_pid.xml man/sd_bus_default.xml man/sd_bus_error.xml man/sd_bus_message_append_array.xml man/sd_bus_message_append_basic.xml man/sd_bus_message_append_string_memfd.xml man/sd_bus_message_append_strv.xml man/sd_bus_message_append.xml man/sd_bus_message_get_cookie.xml man/sd_bus_message_get_monotonic_usec.xml man/sd_bus_negotiate_fds.xml man/sd_bus_new.xml man/sd_bus_path_encode.xml man/sd_bus_request_name.xml man/sd_event_add_child.xml man/sd_event_add_defer.xml man/sd_event_add_signal.xml man/sd_event_add_time.xml man/sd_event_get_fd.xml man/sd_event_new.xml man/sd_event_run.xml man/sd_event_set_name.xml man/sd_event_wait.xml man/systemd-cgtop.xml man/udev_device_get_syspath.xml man/udev_device_has_tag.xml man/udev_device_new_from_syspath.xml man/udev_enumerate_add_match_subsystem.xml man/udev_enumerate_new.xml man/udev_enumerate_s can_devices.xml man/udev_list_entry.xml man/udev_monitor_filter_update.xml man/udev_monitor_new_from_netlink.xml man/udev_monitor_receive_device.xml man/udev_new.xml src/basic src/core src/libsystemd src/login src/machine src/test src/tmpfiles src/udev TODO

David Herrmann dvdhrm at kemper.freedesktop.org
Wed Jun 17 09:27:01 PDT 2015


 CODING_STYLE                               |    7 
 Makefile-man.am                            |  299 +++++++++++++++++
 Makefile.am                                |   22 -
 TODO                                       |    2 
 man/journald.conf.xml                      |   13 
 man/libudev.xml                            |  125 +++++++
 man/sd_bus_creds_get_pid.xml               |    2 
 man/sd_bus_creds_new_from_pid.xml          |    2 
 man/sd_bus_default.xml                     |    2 
 man/sd_bus_error.xml                       |    2 
 man/sd_bus_message_append.xml              |    2 
 man/sd_bus_message_append_array.xml        |    2 
 man/sd_bus_message_append_basic.xml        |    2 
 man/sd_bus_message_append_string_memfd.xml |    2 
 man/sd_bus_message_append_strv.xml         |    2 
 man/sd_bus_message_get_cookie.xml          |    2 
 man/sd_bus_message_get_monotonic_usec.xml  |    2 
 man/sd_bus_negotiate_fds.xml               |    2 
 man/sd_bus_new.xml                         |    2 
 man/sd_bus_path_encode.xml                 |    2 
 man/sd_bus_request_name.xml                |    2 
 man/sd_event_add_child.xml                 |    2 
 man/sd_event_add_defer.xml                 |    2 
 man/sd_event_add_signal.xml                |    2 
 man/sd_event_add_time.xml                  |    2 
 man/sd_event_get_fd.xml                    |    2 
 man/sd_event_new.xml                       |    2 
 man/sd_event_run.xml                       |    2 
 man/sd_event_set_name.xml                  |    2 
 man/sd_event_wait.xml                      |    2 
 man/systemd-cgtop.xml                      |    5 
 man/udev_device_get_syspath.xml            |  207 ++++++++++++
 man/udev_device_has_tag.xml                |  163 +++++++++
 man/udev_device_new_from_syspath.xml       |  145 ++++++++
 man/udev_enumerate_add_match_subsystem.xml |  163 +++++++++
 man/udev_enumerate_new.xml                 |  111 ++++++
 man/udev_enumerate_scan_devices.xml        |  133 +++++++
 man/udev_list_entry.xml                    |  123 +++++++
 man/udev_monitor_filter_update.xml         |  122 +++++++
 man/udev_monitor_new_from_netlink.xml      |  113 ++++++
 man/udev_monitor_receive_device.xml        |  137 +++++++
 man/udev_new.xml                           |  110 ++++++
 src/basic/macro.h                          |   11 
 src/basic/util.c                           |    4 
 src/core/execute.c                         |    7 
 src/libsystemd/.gitignore                  |    1 
 src/libsystemd/libsystemd.sym              |  461 ++++++++++++++++++++++++++
 src/libsystemd/libsystemd.sym.m4           |  499 -----------------------------
 src/libsystemd/sd-bus/bus-error.c          |    8 
 src/libsystemd/sd-bus/bus-internal.h       |    1 
 src/libsystemd/sd-bus/bus-kernel.c         |    4 
 src/libsystemd/sd-bus/bus-match.c          |   37 ++
 src/libsystemd/sd-bus/bus-match.h          |    8 
 src/libsystemd/sd-bus/bus-slot.c           |    2 
 src/libsystemd/sd-bus/sd-bus.c             |   37 +-
 src/libsystemd/sd-bus/test-bus-match.c     |   16 
 src/libsystemd/sd-event/sd-event.c         |   15 
 src/login/logind-button.c                  |    2 
 src/login/logind-core.c                    |   49 ++
 src/login/logind-dbus.c                    |    2 
 src/login/logind.h                         |    4 
 src/machine/machine-dbus.c                 |    4 
 src/test/test-cgroup-mask.c                |   10 
 src/tmpfiles/tmpfiles.c                    |    7 
 src/udev/udevd.c                           |    6 
 65 files changed, 2631 insertions(+), 612 deletions(-)

New commits:
commit a54941f1b47507e1609f0d8eb224f5a5a5732c0e
Merge: 225a833 73a7e46
Author: Kay Sievers <kay at vrfy.org>
Date:   Wed Jun 17 17:18:10 2015 +0200

    Merge pull request #256 from kaysievers/wip
    
    libsystemd: remove list of symbols to export only in the future


commit 225a83300799943a17a7ef64b1178b2527868b67
Merge: 0e782a6 40af96f
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Jun 17 17:11:42 2015 +0200

    Merge pull request #260 from mbiebl/systemshutdowndir-substitution
    
    build-sys: restore systemshutdowndir substitution


commit 40af96f6922282504c0114b1f18bd9ddd6f5d0f7
Author: Michael Biebl <biebl at debian.org>
Date:   Wed Jun 17 16:36:46 2015 +0200

    build-sys: restore systemshutdowndir substitution
    
    This was accidentally removed in d6b07ef.

diff --git a/Makefile.am b/Makefile.am
index 2a79a2a..1c5df68 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5960,6 +5960,7 @@ substitutions = \
        '|systemgidmax=$(SYSTEM_GID_MAX)|' \
        '|TTY_GID=$(TTY_GID)|' \
        '|systemsleepdir=$(systemsleepdir)|' \
+       '|systemshutdowndir=$(systemshutdowndir)|' \
        '|binfmtdir=$(binfmtdir)|' \
        '|modulesloaddir=$(modulesloaddir)|'
 

commit 73a7e4615dd56b69ab6cf5810806b50fed28e9e7
Author: Kay Sievers <kay at vrfy.org>
Date:   Wed Jun 17 15:53:56 2015 +0200

    libsystemd: remove list of symbols to export only in the future

diff --git a/Makefile.am b/Makefile.am
index 2a79a2a..9f74cc7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2841,6 +2841,7 @@ libsystemd_internal_la_SOURCES = \
 	src/systemd/sd-network.h \
 	src/systemd/sd-hwdb.h \
 	src/systemd/sd-device.h \
+	src/libsystemd/libsystemd.sym \
 	src/libsystemd/sd-bus/sd-bus.c \
 	src/libsystemd/sd-bus/bus-control.c \
 	src/libsystemd/sd-bus/bus-control.h \
@@ -2917,9 +2918,6 @@ libsystemd_internal_la_SOURCES = \
 	src/libsystemd/sd-resolve/sd-resolve.c \
 	src/libsystemd/sd-resolve/resolve-util.h
 
-nodist_libsystemd_internal_la_SOURCES = \
-	src/libsystemd/libsystemd.sym
-
 libsystemd_internal_la_LIBADD = \
 	libbasic.la \
 	-lresolv
@@ -2928,14 +2926,10 @@ noinst_LTLIBRARIES += \
 	libsystemd-internal.la
 
 EXTRA_DIST += \
-	src/libsystemd/libsystemd.sym.m4 \
 	src/libsystemd/libsystemd.pc.in \
 	src/libsystemd/sd-bus/DIFFERENCES \
 	src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
 
-BUILT_SOURCES += \
-	src/libsystemd/libsystemd.sym
-
 libsystemd_la_SOURCES = \
 	$(libsystemd_internal_la_SOURCES) \
 	$(libsystemd_journal_internal_la_SOURCES)
@@ -2950,7 +2944,7 @@ libsystemd_la_CFLAGS = \
 libsystemd_la_LDFLAGS = \
 	$(AM_LDFLAGS) \
 	-version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
-	-Wl,--version-script=$(top_builddir)/src/libsystemd/libsystemd.sym
+	-Wl,--version-script=$(top_srcdir)/src/libsystemd/libsystemd.sym
 
 libsystemd_la_LIBADD = \
 	$(libsystemd_internal_la_LIBADD) \
diff --git a/src/libsystemd/.gitignore b/src/libsystemd/.gitignore
index d48e1cd..50a1692 100644
--- a/src/libsystemd/.gitignore
+++ b/src/libsystemd/.gitignore
@@ -1,2 +1 @@
-/libsystemd.sym
 /libsystemd.pc
diff --git a/src/libsystemd/libsystemd.sym b/src/libsystemd/libsystemd.sym
new file mode 100644
index 0000000..809db1f
--- /dev/null
+++ b/src/libsystemd/libsystemd.sym
@@ -0,0 +1,461 @@
+/***
+  This file is part of systemd.
+
+  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
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+***/
+
+LIBSYSTEMD_209 {
+global:
+        /* sd-journal */
+        sd_journal_print;
+        sd_journal_printv;
+        sd_journal_send;
+        sd_journal_sendv;
+        sd_journal_stream_fd;
+        sd_journal_open;
+        sd_journal_close;
+        sd_journal_previous;
+        sd_journal_next;
+        sd_journal_previous_skip;
+        sd_journal_next_skip;
+        sd_journal_get_realtime_usec;
+        sd_journal_get_monotonic_usec;
+        sd_journal_get_data;
+        sd_journal_enumerate_data;
+        sd_journal_restart_data;
+        sd_journal_add_match;
+        sd_journal_flush_matches;
+        sd_journal_seek_head;
+        sd_journal_seek_tail;
+        sd_journal_seek_monotonic_usec;
+        sd_journal_seek_realtime_usec;
+        sd_journal_seek_cursor;
+        sd_journal_get_cursor;
+        sd_journal_get_fd;
+        sd_journal_process;
+        sd_journal_print_with_location;
+        sd_journal_printv_with_location;
+        sd_journal_send_with_location;
+        sd_journal_sendv_with_location;
+        sd_journal_get_cutoff_realtime_usec;
+        sd_journal_get_cutoff_monotonic_usec;
+        sd_journal_wait;
+        sd_journal_open_directory;
+        sd_journal_add_disjunction;
+        sd_journal_perror;
+        sd_journal_perror_with_location;
+        sd_journal_get_usage;
+        sd_journal_test_cursor;
+        sd_journal_query_unique;
+        sd_journal_enumerate_unique;
+        sd_journal_restart_unique;
+        sd_journal_get_catalog;
+        sd_journal_get_catalog_for_message_id;
+        sd_journal_set_data_threshold;
+        sd_journal_get_data_threshold;
+        sd_journal_reliable_fd;
+        sd_journal_get_events;
+        sd_journal_get_timeout;
+        sd_journal_add_conjunction;
+        sd_journal_open_files;
+        sd_journal_open_container;
+
+        /* sd-daemon */
+        sd_booted;
+        sd_is_fifo;
+        sd_is_mq;
+        sd_is_socket;
+        sd_is_socket_inet;
+        sd_is_socket_unix;
+        sd_is_special;
+        sd_listen_fds;
+        sd_notify;
+        sd_notifyf;
+        sd_watchdog_enabled;
+
+        /* sd-id128 */
+        sd_id128_to_string;
+        sd_id128_from_string;
+        sd_id128_randomize;
+        sd_id128_get_machine;
+        sd_id128_get_boot;
+
+        /* sd-login */
+        sd_get_seats;
+        sd_get_sessions;
+        sd_get_uids;
+        sd_login_monitor_flush;
+        sd_login_monitor_get_fd;
+        sd_login_monitor_new;
+        sd_login_monitor_unref;
+        sd_pid_get_owner_uid;
+        sd_pid_get_session;
+        sd_seat_can_multi_session;
+        sd_seat_get_active;
+        sd_seat_get_sessions;
+        sd_session_get_seat;
+        sd_session_get_uid;
+        sd_session_is_active;
+        sd_uid_get_seats;
+        sd_uid_get_sessions;
+        sd_uid_get_state;
+        sd_uid_is_on_seat;
+        sd_pid_get_unit;
+        sd_session_get_service;
+        sd_session_get_type;
+        sd_session_get_class;
+        sd_session_get_display;
+        sd_session_get_state;
+        sd_seat_can_tty;
+        sd_seat_can_graphical;
+        sd_session_get_tty;
+        sd_login_monitor_get_events;
+        sd_login_monitor_get_timeout;
+        sd_pid_get_user_unit;
+        sd_pid_get_machine_name;
+        sd_get_machine_names;
+        sd_pid_get_slice;
+        sd_session_get_vt;
+        sd_session_is_remote;
+        sd_session_get_remote_user;
+        sd_session_get_remote_host;
+local:
+       *;
+};
+
+LIBSYSTEMD_211 {
+global:
+        sd_machine_get_class;
+        sd_peer_get_session;
+        sd_peer_get_owner_uid;
+        sd_peer_get_unit;
+        sd_peer_get_user_unit;
+        sd_peer_get_machine_name;
+        sd_peer_get_slice;
+} LIBSYSTEMD_209;
+
+LIBSYSTEMD_213 {
+global:
+        sd_uid_get_display;
+} LIBSYSTEMD_211;
+
+LIBSYSTEMD_214 {
+global:
+        sd_pid_notify;
+        sd_pid_notifyf;
+} LIBSYSTEMD_213;
+
+LIBSYSTEMD_216 {
+global:
+        sd_machine_get_ifindices;
+} LIBSYSTEMD_214;
+
+LIBSYSTEMD_217 {
+global:
+        sd_session_get_desktop;
+} LIBSYSTEMD_216;
+
+LIBSYSTEMD_219 {
+global:
+        sd_pid_notify_with_fds;
+} LIBSYSTEMD_217;
+
+LIBSYSTEMD_220 {
+global:
+        sd_pid_get_user_slice;
+        sd_peer_get_user_slice;
+} LIBSYSTEMD_219;
+
+LIBSYSTEMD_221 {
+global:
+        /* sd-bus */
+        sd_bus_default;
+        sd_bus_default_user;
+        sd_bus_default_system;
+        sd_bus_open;
+        sd_bus_open_user;
+        sd_bus_open_system;
+        sd_bus_open_system_remote;
+        sd_bus_open_system_machine;
+        sd_bus_new;
+        sd_bus_set_address;
+        sd_bus_set_fd;
+        sd_bus_set_exec;
+        sd_bus_get_address;
+        sd_bus_set_bus_client;
+        sd_bus_is_bus_client;
+        sd_bus_set_server;
+        sd_bus_is_server;
+        sd_bus_set_anonymous;
+        sd_bus_is_anonymous;
+        sd_bus_set_trusted;
+        sd_bus_is_trusted;
+        sd_bus_set_monitor;
+        sd_bus_is_monitor;
+        sd_bus_set_description;
+        sd_bus_get_description;
+        sd_bus_negotiate_creds;
+        sd_bus_negotiate_timestamp;
+        sd_bus_negotiate_fds;
+        sd_bus_can_send;
+        sd_bus_get_creds_mask;
+        sd_bus_set_allow_interactive_authorization;
+        sd_bus_get_allow_interactive_authorization;
+        sd_bus_start;
+        sd_bus_close;
+        sd_bus_try_close;
+        sd_bus_ref;
+        sd_bus_unref;
+        sd_bus_is_open;
+        sd_bus_get_bus_id;
+        sd_bus_get_scope;
+        sd_bus_get_tid;
+        sd_bus_get_owner_creds;
+        sd_bus_send;
+        sd_bus_send_to;
+        sd_bus_call;
+        sd_bus_call_async;
+        sd_bus_get_fd;
+        sd_bus_get_events;
+        sd_bus_get_timeout;
+        sd_bus_process;
+        sd_bus_process_priority;
+        sd_bus_wait;
+        sd_bus_flush;
+        sd_bus_get_current_slot;
+        sd_bus_get_current_message;
+        sd_bus_get_current_handler;
+        sd_bus_get_current_userdata;
+        sd_bus_attach_event;
+        sd_bus_detach_event;
+        sd_bus_get_event;
+        sd_bus_add_filter;
+        sd_bus_add_match;
+        sd_bus_add_object;
+        sd_bus_add_fallback;
+        sd_bus_add_object_vtable;
+        sd_bus_add_fallback_vtable;
+        sd_bus_add_node_enumerator;
+        sd_bus_add_object_manager;
+        sd_bus_slot_ref;
+        sd_bus_slot_unref;
+        sd_bus_slot_get_bus;
+        sd_bus_slot_get_userdata;
+        sd_bus_slot_set_userdata;
+        sd_bus_slot_get_description;
+        sd_bus_slot_set_description;
+        sd_bus_slot_get_current_message;
+        sd_bus_slot_get_current_handler;
+        sd_bus_slot_get_current_userdata;
+        sd_bus_message_new_signal;
+        sd_bus_message_new_method_call;
+        sd_bus_message_new_method_return;
+        sd_bus_message_new_method_error;
+        sd_bus_message_new_method_errorf;
+        sd_bus_message_new_method_errno;
+        sd_bus_message_new_method_errnof;
+        sd_bus_message_ref;
+        sd_bus_message_unref;
+        sd_bus_message_get_type;
+        sd_bus_message_get_cookie;
+        sd_bus_message_get_reply_cookie;
+        sd_bus_message_get_priority;
+        sd_bus_message_get_expect_reply;
+        sd_bus_message_get_auto_start;
+        sd_bus_message_get_allow_interactive_authorization;
+        sd_bus_message_get_signature;
+        sd_bus_message_get_path;
+        sd_bus_message_get_interface;
+        sd_bus_message_get_member;
+        sd_bus_message_get_destination;
+        sd_bus_message_get_sender;
+        sd_bus_message_get_error;
+        sd_bus_message_get_errno;
+        sd_bus_message_get_monotonic_usec;
+        sd_bus_message_get_realtime_usec;
+        sd_bus_message_get_seqnum;
+        sd_bus_message_get_bus;
+        sd_bus_message_get_creds;
+        sd_bus_message_is_signal;
+        sd_bus_message_is_method_call;
+        sd_bus_message_is_method_error;
+        sd_bus_message_is_empty;
+        sd_bus_message_has_signature;
+        sd_bus_message_set_expect_reply;
+        sd_bus_message_set_auto_start;
+        sd_bus_message_set_allow_interactive_authorization;
+        sd_bus_message_set_destination;
+        sd_bus_message_set_priority;
+        sd_bus_message_append;
+        sd_bus_message_append_basic;
+        sd_bus_message_append_array;
+        sd_bus_message_append_array_space;
+        sd_bus_message_append_array_iovec;
+        sd_bus_message_append_array_memfd;
+        sd_bus_message_append_string_space;
+        sd_bus_message_append_string_iovec;
+        sd_bus_message_append_string_memfd;
+        sd_bus_message_append_strv;
+        sd_bus_message_open_container;
+        sd_bus_message_close_container;
+        sd_bus_message_copy;
+        sd_bus_message_read;
+        sd_bus_message_read_basic;
+        sd_bus_message_read_array;
+        sd_bus_message_read_strv;
+        sd_bus_message_skip;
+        sd_bus_message_enter_container;
+        sd_bus_message_exit_container;
+        sd_bus_message_peek_type;
+        sd_bus_message_verify_type;
+        sd_bus_message_at_end;
+        sd_bus_message_rewind;
+        sd_bus_get_unique_name;
+        sd_bus_request_name;
+        sd_bus_release_name;
+        sd_bus_list_names;
+        sd_bus_get_name_creds;
+        sd_bus_get_name_machine_id;
+        sd_bus_call_method;
+        sd_bus_call_method_async;
+        sd_bus_get_property;
+        sd_bus_get_property_trivial;
+        sd_bus_get_property_string;
+        sd_bus_get_property_strv;
+        sd_bus_set_property;
+        sd_bus_reply_method_return;
+        sd_bus_reply_method_error;
+        sd_bus_reply_method_errorf;
+        sd_bus_reply_method_errno;
+        sd_bus_reply_method_errnof;
+        sd_bus_emit_signal;
+        sd_bus_emit_properties_changed_strv;
+        sd_bus_emit_properties_changed;
+        sd_bus_emit_interfaces_added_strv;
+        sd_bus_emit_interfaces_added;
+        sd_bus_emit_interfaces_removed_strv;
+        sd_bus_emit_interfaces_removed;
+        sd_bus_query_sender_creds;
+        sd_bus_query_sender_privilege;
+        sd_bus_creds_new_from_pid;
+        sd_bus_creds_ref;
+        sd_bus_creds_unref;
+        sd_bus_creds_get_mask;
+        sd_bus_creds_get_augmented_mask;
+        sd_bus_creds_get_pid;
+        sd_bus_creds_get_ppid;
+        sd_bus_creds_get_tid;
+        sd_bus_creds_get_uid;
+        sd_bus_creds_get_euid;
+        sd_bus_creds_get_suid;
+        sd_bus_creds_get_fsuid;
+        sd_bus_creds_get_gid;
+        sd_bus_creds_get_egid;
+        sd_bus_creds_get_sgid;
+        sd_bus_creds_get_fsgid;
+        sd_bus_creds_get_supplementary_gids;
+        sd_bus_creds_get_comm;
+        sd_bus_creds_get_tid_comm;
+        sd_bus_creds_get_exe;
+        sd_bus_creds_get_cmdline;
+        sd_bus_creds_get_cgroup;
+        sd_bus_creds_get_unit;
+        sd_bus_creds_get_slice;
+        sd_bus_creds_get_user_unit;
+        sd_bus_creds_get_user_slice;
+        sd_bus_creds_get_session;
+        sd_bus_creds_get_owner_uid;
+        sd_bus_creds_has_effective_cap;
+        sd_bus_creds_has_permitted_cap;
+        sd_bus_creds_has_inheritable_cap;
+        sd_bus_creds_has_bounding_cap;
+        sd_bus_creds_get_selinux_context;
+        sd_bus_creds_get_audit_session_id;
+        sd_bus_creds_get_audit_login_uid;
+        sd_bus_creds_get_tty;
+        sd_bus_creds_get_unique_name;
+        sd_bus_creds_get_well_known_names;
+        sd_bus_creds_get_description;
+        sd_bus_error_free;
+        sd_bus_error_set;
+        sd_bus_error_setf;
+        sd_bus_error_set_const;
+        sd_bus_error_set_errno;
+        sd_bus_error_set_errnof;
+        sd_bus_error_set_errnofv;
+        sd_bus_error_get_errno;
+        sd_bus_error_copy;
+        sd_bus_error_is_set;
+        sd_bus_error_has_name;
+        sd_bus_error_add_map;
+        sd_bus_path_encode;
+        sd_bus_path_decode;
+        sd_bus_track_new;
+        sd_bus_track_ref;
+        sd_bus_track_unref;
+        sd_bus_track_get_bus;
+        sd_bus_track_get_userdata;
+        sd_bus_track_set_userdata;
+        sd_bus_track_add_sender;
+        sd_bus_track_remove_sender;
+        sd_bus_track_add_name;
+        sd_bus_track_remove_name;
+        sd_bus_track_count;
+        sd_bus_track_contains;
+        sd_bus_track_first;
+        sd_bus_track_next;
+
+        /* sd-event */
+        sd_event_default;
+        sd_event_new;
+        sd_event_ref;
+        sd_event_unref;
+        sd_event_add_io;
+        sd_event_add_time;
+        sd_event_add_signal;
+        sd_event_add_child;
+        sd_event_add_defer;
+        sd_event_add_post;
+        sd_event_add_exit;
+        sd_event_prepare;
+        sd_event_wait;
+        sd_event_dispatch;
+        sd_event_run;
+        sd_event_loop;
+        sd_event_exit;
+        sd_event_now;
+        sd_event_get_fd;
+        sd_event_get_state;
+        sd_event_get_tid;
+        sd_event_get_exit_code;
+        sd_event_set_watchdog;
+        sd_event_get_watchdog;
+        sd_event_source_ref;
+        sd_event_source_unref;
+        sd_event_source_get_event;
+        sd_event_source_get_userdata;
+        sd_event_source_set_userdata;
+        sd_event_source_set_description;
+        sd_event_source_get_description;
+        sd_event_source_set_prepare;
+        sd_event_source_get_pending;
+        sd_event_source_get_priority;
+        sd_event_source_set_priority;
+        sd_event_source_get_enabled;
+        sd_event_source_set_enabled;
+        sd_event_source_get_io_fd;
+        sd_event_source_set_io_fd;
+        sd_event_source_get_io_events;
+        sd_event_source_set_io_events;
+        sd_event_source_get_io_revents;
+        sd_event_source_get_time;
+        sd_event_source_set_time;
+        sd_event_source_set_time_accuracy;
+        sd_event_source_get_time_accuracy;
+        sd_event_source_get_time_clock;
+        sd_event_source_get_signal;
+        sd_event_source_get_child_pid;
+} LIBSYSTEMD_220;
diff --git a/src/libsystemd/libsystemd.sym.m4 b/src/libsystemd/libsystemd.sym.m4
deleted file mode 100644
index 3121e71..0000000
--- a/src/libsystemd/libsystemd.sym.m4
+++ /dev/null
@@ -1,499 +0,0 @@
-/***
-  This file is part of systemd.
-
-  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
-  the Free Software Foundation; either version 2.1 of the License, or
-  (at your option) any later version.
-***/
-
-LIBSYSTEMD_209 {
-global:
-        /* sd-journal */
-        sd_journal_print;
-        sd_journal_printv;
-        sd_journal_send;
-        sd_journal_sendv;
-        sd_journal_stream_fd;
-        sd_journal_open;
-        sd_journal_close;
-        sd_journal_previous;
-        sd_journal_next;
-        sd_journal_previous_skip;
-        sd_journal_next_skip;
-        sd_journal_get_realtime_usec;
-        sd_journal_get_monotonic_usec;
-        sd_journal_get_data;
-        sd_journal_enumerate_data;
-        sd_journal_restart_data;
-        sd_journal_add_match;
-        sd_journal_flush_matches;
-        sd_journal_seek_head;
-        sd_journal_seek_tail;
-        sd_journal_seek_monotonic_usec;
-        sd_journal_seek_realtime_usec;
-        sd_journal_seek_cursor;
-        sd_journal_get_cursor;
-        sd_journal_get_fd;
-        sd_journal_process;
-        sd_journal_print_with_location;
-        sd_journal_printv_with_location;
-        sd_journal_send_with_location;
-        sd_journal_sendv_with_location;
-        sd_journal_get_cutoff_realtime_usec;
-        sd_journal_get_cutoff_monotonic_usec;
-        sd_journal_wait;
-        sd_journal_open_directory;
-        sd_journal_add_disjunction;
-        sd_journal_perror;
-        sd_journal_perror_with_location;
-        sd_journal_get_usage;
-        sd_journal_test_cursor;
-        sd_journal_query_unique;
-        sd_journal_enumerate_unique;
-        sd_journal_restart_unique;
-        sd_journal_get_catalog;
-        sd_journal_get_catalog_for_message_id;
-        sd_journal_set_data_threshold;
-        sd_journal_get_data_threshold;
-        sd_journal_reliable_fd;
-        sd_journal_get_events;
-        sd_journal_get_timeout;
-        sd_journal_add_conjunction;
-        sd_journal_open_files;
-        sd_journal_open_container;
-
-        /* sd-daemon */
-        sd_booted;
-        sd_is_fifo;
-        sd_is_mq;
-        sd_is_socket;
-        sd_is_socket_inet;
-        sd_is_socket_unix;
-        sd_is_special;
-        sd_listen_fds;
-        sd_notify;
-        sd_notifyf;
-        sd_watchdog_enabled;
-
-        /* sd-id128 */
-        sd_id128_to_string;
-        sd_id128_from_string;
-        sd_id128_randomize;
-        sd_id128_get_machine;
-        sd_id128_get_boot;
-
-        /* sd-login */
-        sd_get_seats;
-        sd_get_sessions;
-        sd_get_uids;
-        sd_login_monitor_flush;
-        sd_login_monitor_get_fd;
-        sd_login_monitor_new;
-        sd_login_monitor_unref;
-        sd_pid_get_owner_uid;
-        sd_pid_get_session;
-        sd_seat_can_multi_session;
-        sd_seat_get_active;
-        sd_seat_get_sessions;
-        sd_session_get_seat;
-        sd_session_get_uid;
-        sd_session_is_active;
-        sd_uid_get_seats;
-        sd_uid_get_sessions;
-        sd_uid_get_state;
-        sd_uid_is_on_seat;
-        sd_pid_get_unit;
-        sd_session_get_service;
-        sd_session_get_type;
-        sd_session_get_class;
-        sd_session_get_display;
-        sd_session_get_state;
-        sd_seat_can_tty;
-        sd_seat_can_graphical;
-        sd_session_get_tty;
-        sd_login_monitor_get_events;
-        sd_login_monitor_get_timeout;
-        sd_pid_get_user_unit;
-        sd_pid_get_machine_name;
-        sd_get_machine_names;
-        sd_pid_get_slice;
-        sd_session_get_vt;
-        sd_session_is_remote;
-        sd_session_get_remote_user;
-        sd_session_get_remote_host;
-local:
-       *;
-};
-
-LIBSYSTEMD_211 {
-global:
-        sd_machine_get_class;
-        sd_peer_get_session;
-        sd_peer_get_owner_uid;
-        sd_peer_get_unit;
-        sd_peer_get_user_unit;
-        sd_peer_get_machine_name;
-        sd_peer_get_slice;
-} LIBSYSTEMD_209;
-
-LIBSYSTEMD_213 {
-global:
-        sd_uid_get_display;
-} LIBSYSTEMD_211;
-
-LIBSYSTEMD_214 {
-global:
-        sd_pid_notify;
-        sd_pid_notifyf;
-} LIBSYSTEMD_213;
-
-LIBSYSTEMD_216 {
-global:
-        sd_machine_get_ifindices;
-} LIBSYSTEMD_214;
-
-LIBSYSTEMD_217 {
-global:
-        sd_session_get_desktop;
-} LIBSYSTEMD_216;
-
-LIBSYSTEMD_219 {
-global:
-        sd_pid_notify_with_fds;
-} LIBSYSTEMD_217;
-
-LIBSYSTEMD_220 {
-global:
-        sd_pid_get_user_slice;
-        sd_peer_get_user_slice;
-} LIBSYSTEMD_219;
-
-LIBSYSTEMD_221 {
-global:
-        /* sd-bus */
-        sd_bus_default;
-        sd_bus_default_user;
-        sd_bus_default_system;
-        sd_bus_open;
-        sd_bus_open_user;
-        sd_bus_open_system;
-        sd_bus_open_system_remote;
-        sd_bus_open_system_machine;
-        sd_bus_new;
-        sd_bus_set_address;
-        sd_bus_set_fd;
-        sd_bus_set_exec;
-        sd_bus_get_address;
-        sd_bus_set_bus_client;
-        sd_bus_is_bus_client;
-        sd_bus_set_server;
-        sd_bus_is_server;
-        sd_bus_set_anonymous;
-        sd_bus_is_anonymous;
-        sd_bus_set_trusted;
-        sd_bus_is_trusted;
-        sd_bus_set_monitor;
-        sd_bus_is_monitor;
-        sd_bus_set_description;
-        sd_bus_get_description;
-        sd_bus_negotiate_creds;
-        sd_bus_negotiate_timestamp;
-        sd_bus_negotiate_fds;
-        sd_bus_can_send;
-        sd_bus_get_creds_mask;
-        sd_bus_set_allow_interactive_authorization;
-        sd_bus_get_allow_interactive_authorization;
-        sd_bus_start;
-        sd_bus_close;
-        sd_bus_try_close;
-        sd_bus_ref;
-        sd_bus_unref;
-        sd_bus_is_open;
-        sd_bus_get_bus_id;
-        sd_bus_get_scope;
-        sd_bus_get_tid;
-        sd_bus_get_owner_creds;
-        sd_bus_send;
-        sd_bus_send_to;
-        sd_bus_call;
-        sd_bus_call_async;
-        sd_bus_get_fd;
-        sd_bus_get_events;
-        sd_bus_get_timeout;
-        sd_bus_process;
-        sd_bus_process_priority;
-        sd_bus_wait;
-        sd_bus_flush;
-        sd_bus_get_current_slot;
-        sd_bus_get_current_message;
-        sd_bus_get_current_handler;
-        sd_bus_get_current_userdata;
-        sd_bus_attach_event;
-        sd_bus_detach_event;
-        sd_bus_get_event;
-        sd_bus_add_filter;
-        sd_bus_add_match;
-        sd_bus_add_object;
-        sd_bus_add_fallback;
-        sd_bus_add_object_vtable;
-        sd_bus_add_fallback_vtable;
-        sd_bus_add_node_enumerator;
-        sd_bus_add_object_manager;
-        sd_bus_slot_ref;
-        sd_bus_slot_unref;
-        sd_bus_slot_get_bus;
-        sd_bus_slot_get_userdata;
-        sd_bus_slot_set_userdata;
-        sd_bus_slot_get_description;
-        sd_bus_slot_set_description;
-        sd_bus_slot_get_current_message;
-        sd_bus_slot_get_current_handler;
-        sd_bus_slot_get_current_userdata;
-        sd_bus_message_new_signal;
-        sd_bus_message_new_method_call;
-        sd_bus_message_new_method_return;
-        sd_bus_message_new_method_error;
-        sd_bus_message_new_method_errorf;
-        sd_bus_message_new_method_errno;
-        sd_bus_message_new_method_errnof;
-        sd_bus_message_ref;
-        sd_bus_message_unref;
-        sd_bus_message_get_type;
-        sd_bus_message_get_cookie;
-        sd_bus_message_get_reply_cookie;
-        sd_bus_message_get_priority;
-        sd_bus_message_get_expect_reply;
-        sd_bus_message_get_auto_start;
-        sd_bus_message_get_allow_interactive_authorization;
-        sd_bus_message_get_signature;
-        sd_bus_message_get_path;
-        sd_bus_message_get_interface;
-        sd_bus_message_get_member;
-        sd_bus_message_get_destination;
-        sd_bus_message_get_sender;
-        sd_bus_message_get_error;
-        sd_bus_message_get_errno;
-        sd_bus_message_get_monotonic_usec;
-        sd_bus_message_get_realtime_usec;
-        sd_bus_message_get_seqnum;
-        sd_bus_message_get_bus;
-        sd_bus_message_get_creds;
-        sd_bus_message_is_signal;
-        sd_bus_message_is_method_call;
-        sd_bus_message_is_method_error;
-        sd_bus_message_is_empty;
-        sd_bus_message_has_signature;
-        sd_bus_message_set_expect_reply;
-        sd_bus_message_set_auto_start;
-        sd_bus_message_set_allow_interactive_authorization;
-        sd_bus_message_set_destination;
-        sd_bus_message_set_priority;
-        sd_bus_message_append;
-        sd_bus_message_append_basic;
-        sd_bus_message_append_array;
-        sd_bus_message_append_array_space;
-        sd_bus_message_append_array_iovec;
-        sd_bus_message_append_array_memfd;
-        sd_bus_message_append_string_space;
-        sd_bus_message_append_string_iovec;
-        sd_bus_message_append_string_memfd;
-        sd_bus_message_append_strv;
-        sd_bus_message_open_container;
-        sd_bus_message_close_container;
-        sd_bus_message_copy;
-        sd_bus_message_read;
-        sd_bus_message_read_basic;
-        sd_bus_message_read_array;
-        sd_bus_message_read_strv;
-        sd_bus_message_skip;
-        sd_bus_message_enter_container;
-        sd_bus_message_exit_container;
-        sd_bus_message_peek_type;
-        sd_bus_message_verify_type;
-        sd_bus_message_at_end;
-        sd_bus_message_rewind;
-        sd_bus_get_unique_name;
-        sd_bus_request_name;
-        sd_bus_release_name;
-        sd_bus_list_names;
-        sd_bus_get_name_creds;
-        sd_bus_get_name_machine_id;
-        sd_bus_call_method;
-        sd_bus_call_method_async;
-        sd_bus_get_property;
-        sd_bus_get_property_trivial;
-        sd_bus_get_property_string;
-        sd_bus_get_property_strv;
-        sd_bus_set_property;
-        sd_bus_reply_method_return;
-        sd_bus_reply_method_error;
-        sd_bus_reply_method_errorf;
-        sd_bus_reply_method_errno;
-        sd_bus_reply_method_errnof;
-        sd_bus_emit_signal;
-        sd_bus_emit_properties_changed_strv;
-        sd_bus_emit_properties_changed;
-        sd_bus_emit_interfaces_added_strv;
-        sd_bus_emit_interfaces_added;
-        sd_bus_emit_interfaces_removed_strv;
-        sd_bus_emit_interfaces_removed;
-        sd_bus_query_sender_creds;
-        sd_bus_query_sender_privilege;
-        sd_bus_creds_new_from_pid;
-        sd_bus_creds_ref;
-        sd_bus_creds_unref;
-        sd_bus_creds_get_mask;
-        sd_bus_creds_get_augmented_mask;
-        sd_bus_creds_get_pid;
-        sd_bus_creds_get_ppid;
-        sd_bus_creds_get_tid;
-        sd_bus_creds_get_uid;
-        sd_bus_creds_get_euid;
-        sd_bus_creds_get_suid;
-        sd_bus_creds_get_fsuid;
-        sd_bus_creds_get_gid;
-        sd_bus_creds_get_egid;
-        sd_bus_creds_get_sgid;
-        sd_bus_creds_get_fsgid;
-        sd_bus_creds_get_supplementary_gids;
-        sd_bus_creds_get_comm;
-        sd_bus_creds_get_tid_comm;
-        sd_bus_creds_get_exe;
-        sd_bus_creds_get_cmdline;
-        sd_bus_creds_get_cgroup;
-        sd_bus_creds_get_unit;
-        sd_bus_creds_get_slice;
-        sd_bus_creds_get_user_unit;
-        sd_bus_creds_get_user_slice;
-        sd_bus_creds_get_session;
-        sd_bus_creds_get_owner_uid;
-        sd_bus_creds_has_effective_cap;
-        sd_bus_creds_has_permitted_cap;
-        sd_bus_creds_has_inheritable_cap;
-        sd_bus_creds_has_bounding_cap;
-        sd_bus_creds_get_selinux_context;
-        sd_bus_creds_get_audit_session_id;
-        sd_bus_creds_get_audit_login_uid;
-        sd_bus_creds_get_tty;
-        sd_bus_creds_get_unique_name;
-        sd_bus_creds_get_well_known_names;
-        sd_bus_creds_get_description;
-        sd_bus_error_free;
-        sd_bus_error_set;
-        sd_bus_error_setf;
-        sd_bus_error_set_const;
-        sd_bus_error_set_errno;
-        sd_bus_error_set_errnof;
-        sd_bus_error_set_errnofv;
-        sd_bus_error_get_errno;
-        sd_bus_error_copy;
-        sd_bus_error_is_set;
-        sd_bus_error_has_name;
-        sd_bus_error_add_map;
-        sd_bus_path_encode;
-        sd_bus_path_decode;
-        sd_bus_track_new;
-        sd_bus_track_ref;
-        sd_bus_track_unref;
-        sd_bus_track_get_bus;
-        sd_bus_track_get_userdata;
-        sd_bus_track_set_userdata;
-        sd_bus_track_add_sender;
-        sd_bus_track_remove_sender;
-        sd_bus_track_add_name;
-        sd_bus_track_remove_name;
-        sd_bus_track_count;
-        sd_bus_track_contains;
-        sd_bus_track_first;
-        sd_bus_track_next;
-
-        /* sd-event */
-        sd_event_default;
-        sd_event_new;
-        sd_event_ref;
-        sd_event_unref;
-        sd_event_add_io;
-        sd_event_add_time;
-        sd_event_add_signal;
-        sd_event_add_child;
-        sd_event_add_defer;
-        sd_event_add_post;
-        sd_event_add_exit;
-        sd_event_prepare;
-        sd_event_wait;
-        sd_event_dispatch;
-        sd_event_run;
-        sd_event_loop;
-        sd_event_exit;
-        sd_event_now;
-        sd_event_get_fd;
-        sd_event_get_state;
-        sd_event_get_tid;
-        sd_event_get_exit_code;
-        sd_event_set_watchdog;
-        sd_event_get_watchdog;
-        sd_event_source_ref;
-        sd_event_source_unref;
-        sd_event_source_get_event;
-        sd_event_source_get_userdata;
-        sd_event_source_set_userdata;
-        sd_event_source_set_description;
-        sd_event_source_get_description;
-        sd_event_source_set_prepare;
-        sd_event_source_get_pending;
-        sd_event_source_get_priority;
-        sd_event_source_set_priority;
-        sd_event_source_get_enabled;
-        sd_event_source_set_enabled;
-        sd_event_source_get_io_fd;
-        sd_event_source_set_io_fd;
-        sd_event_source_get_io_events;
-        sd_event_source_set_io_events;
-        sd_event_source_get_io_revents;
-        sd_event_source_get_time;
-        sd_event_source_set_time;
-        sd_event_source_set_time_accuracy;
-        sd_event_source_get_time_accuracy;
-        sd_event_source_get_time_clock;
-        sd_event_source_get_signal;
-        sd_event_source_get_child_pid;
-} LIBSYSTEMD_220;
-
-m4_ifdef(`ENABLE_KDBUS',
-LIBSYSTEMD_FUTURE {
-global:
-        /* sd-utf8 */
-        sd_utf8_is_valid;
-        sd_ascii_is_valid;
-
-        /* sd-resolve */
-        sd_resolve_default;
-        sd_resolve_new;
-        sd_resolve_ref;
-        sd_resolve_unref;
-        sd_resolve_get_fd;
-        sd_resolve_get_events;
-        sd_resolve_get_timeout;
-        sd_resolve_process;
-        sd_resolve_wait;
-        sd_resolve_get_tid;
-        sd_resolve_attach_event;
-        sd_resolve_detach_event;
-        sd_resolve_get_event;
-        sd_resolve_getaddrinfo;
-        sd_resolve_getnameinfo;
-        sd_resolve_res_query;
-        sd_resolve_res_search;
-        sd_resolve_query_ref;
-        sd_resolve_query_unref;
-        sd_resolve_query_is_done;
-        sd_resolve_query_get_userdata;
-        sd_resolve_query_set_userdata;
-        sd_resolve_query_get_resolve;
-
-        /* sd-path */
-        sd_path_home;
-        sd_path_search;
-} LIBSYSTEMD_220;
-)

commit 0e782a6422b6ac614d3177dd4fc00ffe6747cbc5
Merge: eef8c1f 602a41c
Author: David Herrmann <dh.herrmann at googlemail.com>
Date:   Wed Jun 17 15:56:04 2015 +0200

    Merge pull request #254 from poettering/external-displays2
    
    logind: rework display counting when detecting whether the system is …


commit eef8c1f6fd712749ff0204097eef9545d90842a2
Merge: 1542c01 b0f5a51
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Jun 17 15:48:31 2015 +0200

    Merge pull request #221 from utezduyar/man-cgtop-explain-max-cpu
    
    man: explain max CPU load on cgtop


commit 1542c01b1dd5e34bfc2355aba603131e458ee0da
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Sat Jun 13 13:14:37 2015 -0400

    tmpfiles: only root-owned aquota.* files are special
    
    Fixes #188.

diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 027a5c2..42f757c 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -496,9 +496,10 @@ static int dir_cleanup(
                         }
 
                         if (mountpoint && S_ISREG(s.st_mode))
-                                if ((streq(dent->d_name, ".journal") && s.st_uid == 0) ||
-                                    streq(dent->d_name, "aquota.user") ||
-                                    streq(dent->d_name, "aquota.group")) {
+                                if (s.st_uid == 0 && STR_IN_SET(dent->d_name,
+                                                                ".journal",
+                                                                "aquota.user",
+                                                                "aquota.group")) {
                                         log_debug("Skipping \"%s\".", sub_path);
                                         continue;
                                 }

commit 3c222be8319bfe233b18014bc47b1ea7c13fb407
Merge: 203e81d 06255d6
Author: Kay Sievers <kay at vrfy.org>
Date:   Wed Jun 17 15:44:02 2015 +0200

    Merge pull request #253 from dvdhrm/libudev-man
    
    man: add libudev man-pages (skeletons)


commit 602a41c22ac2df33b4b5e5083719c1cfaf58acf9
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Jun 17 00:24:05 2015 +0200

    logind: rework display counting when detecting whether the system is docked
    
    Previously, we'd just count connected displays, and if there was 2 or
    more we assumed a "docked" state.
    
    With this change we now:
    
    - Only count external displays, ignore internal ones (which we detect by
      checking the connector name against a whitelist of known external plug
      types)
    
    - We ignore connectors which are explicitly disabled
    
    - We then compare the count with >= 1 rather than >= 2 as before
    
    This new logic has the benefit that systems that disconnect the internal
    display when the lid is closed are better supported. Also, explicitly
    disabled ports do not confuse the algorithm anymore.
    
    This new algorithm has been suggested here:
    
    http://lists.freedesktop.org/archives/intel-gfx/2015-June/068821.html
    
    This also makes two functions static, that are not used outside of their
    .c files.

diff --git a/src/login/logind-button.c b/src/login/logind-button.c
index 8079d0b..210b889 100644
--- a/src/login/logind-button.c
+++ b/src/login/logind-button.c
@@ -100,7 +100,7 @@ static void button_lid_switch_handle_action(Manager *manager, bool is_edge) {
         assert(manager);
 
         /* If we are docked, handle the lid switch differently */
-        if (manager_is_docked_or_multiple_displays(manager))
+        if (manager_is_docked_or_external_displays(manager))
                 handle_action = manager->handle_lid_switch_docked;
         else
                 handle_action = manager->handle_lid_switch;
diff --git a/src/login/logind-core.c b/src/login/logind-core.c
index f9e6ddf..a6c01f7 100644
--- a/src/login/logind-core.c
+++ b/src/login/logind-core.c
@@ -477,7 +477,7 @@ int manager_spawn_autovt(Manager *m, unsigned int vtnr) {
         return r;
 }
 
-bool manager_is_docked(Manager *m) {
+static bool manager_is_docked(Manager *m) {
         Iterator i;
         Button *b;
 
@@ -488,7 +488,7 @@ bool manager_is_docked(Manager *m) {
         return false;
 }
 
-int manager_count_displays(Manager *m) {
+static int manager_count_external_displays(Manager *m) {
         _cleanup_udev_enumerate_unref_ struct udev_enumerate *e = NULL;
         struct udev_list_entry *item = NULL, *first = NULL;
         int r;
@@ -510,7 +510,8 @@ int manager_count_displays(Manager *m) {
         udev_list_entry_foreach(item, first) {
                 _cleanup_udev_device_unref_ struct udev_device *d = NULL;
                 struct udev_device *p;
-                const char *status;
+                const char *status, *enabled, *dash, *nn, *i;
+                bool external = false;
 
                 d = udev_device_new_from_syspath(m->udev, udev_list_entry_get_name(item));
                 if (!d)
@@ -526,6 +527,40 @@ int manager_count_displays(Manager *m) {
                 if (!streq_ptr(udev_device_get_subsystem(p), "drm"))
                         continue;
 
+                nn = udev_device_get_sysname(d);
+                if (!nn)
+                        continue;
+
+                /* Ignore internal displays: the type is encoded in
+                 * the sysfs name, as the second dash seperated item
+                 * (the first is the card name, the last the connector
+                 * number). We implement a whitelist of external
+                 * displays here, rather than a whitelist, to ensure
+                 * we don't block suspends too eagerly. */
+                dash = strchr(nn, '-');
+                if (!dash)
+                        continue;
+
+                dash++;
+                FOREACH_STRING(i, "VGA-", "DVI-I-", "DVI-D-", "DVI-A-"
+                               "Composite-", "SVIDEO-", "Component-",
+                               "DIN-", "DP-", "HDMI-A-", "HDMI-B-", "TV-") {
+
+                        if (startswith(dash, i)) {
+                                external = true;
+                                break;
+                        }
+                }
+                if (!external)
+                        continue;
+
+                /* Ignore ports that are not enabled */
+                enabled = udev_device_get_sysattr_value(d, "enabled");
+                if (!enabled)
+                        continue;
+                if (!streq_ptr(enabled, "enabled"))
+                        continue;
+
                 /* We count any connector which is not explicitly
                  * "disconnected" as connected. */
                 status = udev_device_get_sysattr_value(d, "status");
@@ -536,7 +571,7 @@ int manager_count_displays(Manager *m) {
         return n;
 }
 
-bool manager_is_docked_or_multiple_displays(Manager *m) {
+bool manager_is_docked_or_external_displays(Manager *m) {
         int n;
 
         /* If we are docked don't react to lid closing */
@@ -547,11 +582,11 @@ bool manager_is_docked_or_multiple_displays(Manager *m) {
 
         /* If we have more than one display connected,
          * assume that we are docked. */
-        n = manager_count_displays(m);
+        n = manager_count_external_displays(m);
         if (n < 0)
                 log_warning_errno(n, "Display counting failed: %m");
-        else if (n > 1) {
-                log_debug("Multiple (%i) displays connected.", n);
+        else if (n >= 1) {
+                log_debug("External (%i) displays connected.", n);
                 return true;
         }
 
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index e6f9ec7..8ebcd3f 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -258,7 +258,7 @@ static int property_get_docked(
         assert(reply);
         assert(m);
 
-        return sd_bus_message_append(reply, "b", manager_is_docked_or_multiple_displays(m));
+        return sd_bus_message_append(reply, "b", manager_is_docked_or_external_displays(m));
 }
 
 static int method_get_session(sd_bus_message *message, void *userdata, sd_bus_error *error) {
diff --git a/src/login/logind.h b/src/login/logind.h
index cd226f5..feb381d 100644
--- a/src/login/logind.h
+++ b/src/login/logind.h
@@ -156,9 +156,7 @@ int manager_get_idle_hint(Manager *m, dual_timestamp *t);
 int manager_get_user_by_pid(Manager *m, pid_t pid, User **user);
 int manager_get_session_by_pid(Manager *m, pid_t pid, Session **session);
 
-bool manager_is_docked(Manager *m);
-int manager_count_displays(Manager *m);
-bool manager_is_docked_or_multiple_displays(Manager *m);
+bool manager_is_docked_or_external_displays(Manager *m);
 
 extern const sd_bus_vtable manager_vtable[];
 

commit 203e81db24ccb9b4dcb0b1bad0ba554116267d20
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Jun 17 15:40:37 2015 +0200

    update TODO

diff --git a/TODO b/TODO
index c25f3d3..914261f 100644
--- a/TODO
+++ b/TODO
@@ -28,6 +28,8 @@ External:
 
 Features:
 
+* "systemctl daemon-reload" should result in /etc/systemd/system.conf being reloaded by systemd
+
 * install: include generator dirs in unit file search paths
 
 * networkd: add support for configuring ipv6 privacy extensions

commit 06255d6f76f3f630a9634d745a48910b1ea3e4d3
Author: David Herrmann <dh.herrmann at gmail.com>
Date:   Wed Jun 17 15:11:11 2015 +0200

    man: add libudev man-pages (skeletons)
    
    This adds man-pages for most of the libudev symbols we export. Similar
    symbols are grouped together in a single man-page, with respective links
    added. All man-pages contain the full skeleton including NAME, SYNOPSIS,
    RETURN VALUE and SEE ALSO. However, most of them still lack the
    DESCRIPTION part. This should be copied from the gtkdoc descriptions in
    src/libudev/libudev*.[ch]. Any help is welcome! (the whole skeleton is
    already done, so it's really just about the prose-part of the man-pages to
    be written).
    
    Missing from the man-pages are the following parts:
      - udev_set_log_fn()
      - udev_[gs]et_log_priority()
      - udev_[gs]et_userdata()
      - udev_list_entry_foreach()
      - udev_device_get_seqnum()
      - udev_device_get_usec_since_initialized()
      - udev_util_encode_string()
    These are considered legacy, afaik. If not, please feel free to add them
    now!
    
    Furthermore, udev-hwdb and udev-queue are not documented at all (for the
    same reasons).

diff --git a/Makefile-man.am b/Makefile-man.am
index 85579e0..15781ba 100644
--- a/Makefile-man.am
+++ b/Makefile-man.am
@@ -18,6 +18,7 @@ MANPAGES += \
 	man/journald.conf.5 \
 	man/kernel-command-line.7 \
 	man/kernel-install.8 \
+	man/libudev.3 \
 	man/locale.conf.5 \
 	man/localtime.5 \
 	man/machine-id.5 \
@@ -122,6 +123,17 @@ MANPAGES += \
 	man/tmpfiles.d.5 \
 	man/udev.7 \
 	man/udev.conf.5 \
+	man/udev_device_get_syspath.3 \
+	man/udev_device_has_tag.3 \
+	man/udev_device_new_from_syspath.3 \
+	man/udev_enumerate_add_match_subsystem.3 \
+	man/udev_enumerate_new.3 \
+	man/udev_enumerate_scan_devices.3 \
+	man/udev_list_entry.3 \
+	man/udev_monitor_filter_update.3 \
+	man/udev_monitor_new_from_netlink.3 \
+	man/udev_monitor_receive_device.3 \
+	man/udev_new.3 \
 	man/udevadm.8
 MANPAGES_ALIAS += \
 	man/SD_ALERT.3 \
@@ -233,6 +245,61 @@ MANPAGES_ALIAS += \
 	man/systemd-udevd.8 \
 	man/systemd-update-done.8 \
 	man/systemd-user.conf.5 \
+	man/udev_device_get_action.3 \
+	man/udev_device_get_devlinks_list_entry.3 \
+	man/udev_device_get_devnode.3 \
+	man/udev_device_get_devnum.3 \
+	man/udev_device_get_devpath.3 \
+	man/udev_device_get_devtype.3 \
+	man/udev_device_get_driver.3 \
+	man/udev_device_get_is_initialized.3 \
+	man/udev_device_get_parent.3 \
+	man/udev_device_get_parent_with_subsystem_devtype.3 \
+	man/udev_device_get_properties_list_entry.3 \
+	man/udev_device_get_property_value.3 \
+	man/udev_device_get_subsystem.3 \
+	man/udev_device_get_sysattr_list_entry.3 \
+	man/udev_device_get_sysattr_value.3 \
+	man/udev_device_get_sysname.3 \
+	man/udev_device_get_sysnum.3 \
+	man/udev_device_get_tags_list_entry.3 \
+	man/udev_device_get_udev.3 \
+	man/udev_device_new_from_device_id.3 \
+	man/udev_device_new_from_devnum.3 \
+	man/udev_device_new_from_environment.3 \
+	man/udev_device_new_from_subsystem_sysname.3 \
+	man/udev_device_ref.3 \
+	man/udev_device_set_sysattr_value.3 \
+	man/udev_device_unref.3 \
+	man/udev_enumerate_add_match_is_initialized.3 \
+	man/udev_enumerate_add_match_parent.3 \
+	man/udev_enumerate_add_match_property.3 \
+	man/udev_enumerate_add_match_sysattr.3 \
+	man/udev_enumerate_add_match_sysname.3 \
+	man/udev_enumerate_add_match_tag.3 \
+	man/udev_enumerate_add_nomatch_subsystem.3 \
+	man/udev_enumerate_add_nomatch_sysattr.3 \
+	man/udev_enumerate_add_syspath.3 \
+	man/udev_enumerate_get_list_entry.3 \
+	man/udev_enumerate_get_udev.3 \
+	man/udev_enumerate_ref.3 \
+	man/udev_enumerate_scan_subsystems.3 \
+	man/udev_enumerate_unref.3 \
+	man/udev_list_entry_get_by_name.3 \
+	man/udev_list_entry_get_name.3 \
+	man/udev_list_entry_get_next.3 \
+	man/udev_list_entry_get_value.3 \
+	man/udev_monitor_enable_receiving.3 \
+	man/udev_monitor_filter_add_match_subsystem_devtype.3 \
+	man/udev_monitor_filter_add_match_tag.3 \
+	man/udev_monitor_filter_remove.3 \
+	man/udev_monitor_get_fd.3 \
+	man/udev_monitor_get_udev.3 \
+	man/udev_monitor_ref.3 \
+	man/udev_monitor_set_receive_buffer_size.3 \
+	man/udev_monitor_unref.3 \
+	man/udev_ref.3 \
+	man/udev_unref.3 \
 	man/user.conf.d.5
 man/SD_ALERT.3: man/sd-daemon.3
 man/SD_CRIT.3: man/sd-daemon.3
@@ -343,6 +410,61 @@ man/systemd-udevd-kernel.socket.8: man/systemd-udevd.service.8
 man/systemd-udevd.8: man/systemd-udevd.service.8
 man/systemd-update-done.8: man/systemd-update-done.service.8
 man/systemd-user.conf.5: man/systemd-system.conf.5
+man/udev_device_get_action.3: man/udev_device_get_syspath.3
+man/udev_device_get_devlinks_list_entry.3: man/udev_device_has_tag.3
+man/udev_device_get_devnode.3: man/udev_device_get_syspath.3
+man/udev_device_get_devnum.3: man/udev_device_get_syspath.3
+man/udev_device_get_devpath.3: man/udev_device_get_syspath.3
+man/udev_device_get_devtype.3: man/udev_device_get_syspath.3
+man/udev_device_get_driver.3: man/udev_device_get_syspath.3
+man/udev_device_get_is_initialized.3: man/udev_device_get_syspath.3
+man/udev_device_get_parent.3: man/udev_device_get_syspath.3
+man/udev_device_get_parent_with_subsystem_devtype.3: man/udev_device_get_syspath.3
+man/udev_device_get_properties_list_entry.3: man/udev_device_has_tag.3
+man/udev_device_get_property_value.3: man/udev_device_has_tag.3
+man/udev_device_get_subsystem.3: man/udev_device_get_syspath.3
+man/udev_device_get_sysattr_list_entry.3: man/udev_device_has_tag.3
+man/udev_device_get_sysattr_value.3: man/udev_device_has_tag.3
+man/udev_device_get_sysname.3: man/udev_device_get_syspath.3
+man/udev_device_get_sysnum.3: man/udev_device_get_syspath.3
+man/udev_device_get_tags_list_entry.3: man/udev_device_has_tag.3
+man/udev_device_get_udev.3: man/udev_device_get_syspath.3
+man/udev_device_new_from_device_id.3: man/udev_device_new_from_syspath.3
+man/udev_device_new_from_devnum.3: man/udev_device_new_from_syspath.3
+man/udev_device_new_from_environment.3: man/udev_device_new_from_syspath.3
+man/udev_device_new_from_subsystem_sysname.3: man/udev_device_new_from_syspath.3
+man/udev_device_ref.3: man/udev_device_new_from_syspath.3
+man/udev_device_set_sysattr_value.3: man/udev_device_has_tag.3
+man/udev_device_unref.3: man/udev_device_new_from_syspath.3
+man/udev_enumerate_add_match_is_initialized.3: man/udev_enumerate_add_match_subsystem.3
+man/udev_enumerate_add_match_parent.3: man/udev_enumerate_add_match_subsystem.3
+man/udev_enumerate_add_match_property.3: man/udev_enumerate_add_match_subsystem.3
+man/udev_enumerate_add_match_sysattr.3: man/udev_enumerate_add_match_subsystem.3
+man/udev_enumerate_add_match_sysname.3: man/udev_enumerate_add_match_subsystem.3
+man/udev_enumerate_add_match_tag.3: man/udev_enumerate_add_match_subsystem.3
+man/udev_enumerate_add_nomatch_subsystem.3: man/udev_enumerate_add_match_subsystem.3
+man/udev_enumerate_add_nomatch_sysattr.3: man/udev_enumerate_add_match_subsystem.3
+man/udev_enumerate_add_syspath.3: man/udev_enumerate_scan_devices.3
+man/udev_enumerate_get_list_entry.3: man/udev_enumerate_scan_devices.3
+man/udev_enumerate_get_udev.3: man/udev_enumerate_scan_devices.3
+man/udev_enumerate_ref.3: man/udev_enumerate_new.3
+man/udev_enumerate_scan_subsystems.3: man/udev_enumerate_scan_devices.3
+man/udev_enumerate_unref.3: man/udev_enumerate_new.3
+man/udev_list_entry_get_by_name.3: man/udev_list_entry.3
+man/udev_list_entry_get_name.3: man/udev_list_entry.3
+man/udev_list_entry_get_next.3: man/udev_list_entry.3
+man/udev_list_entry_get_value.3: man/udev_list_entry.3
+man/udev_monitor_enable_receiving.3: man/udev_monitor_receive_device.3
+man/udev_monitor_filter_add_match_subsystem_devtype.3: man/udev_monitor_filter_update.3
+man/udev_monitor_filter_add_match_tag.3: man/udev_monitor_filter_update.3
+man/udev_monitor_filter_remove.3: man/udev_monitor_filter_update.3
+man/udev_monitor_get_fd.3: man/udev_monitor_receive_device.3
+man/udev_monitor_get_udev.3: man/udev_monitor_receive_device.3
+man/udev_monitor_ref.3: man/udev_monitor_new_from_netlink.3
+man/udev_monitor_set_receive_buffer_size.3: man/udev_monitor_receive_device.3
+man/udev_monitor_unref.3: man/udev_monitor_new_from_netlink.3
+man/udev_ref.3: man/udev_new.3
+man/udev_unref.3: man/udev_new.3
 man/user.conf.d.5: man/systemd-system.conf.5
 man/SD_ALERT.html: man/sd-daemon.html
 	$(html-alias)
@@ -671,6 +793,171 @@ man/systemd-update-done.html: man/systemd-update-done.service.html
 man/systemd-user.conf.html: man/systemd-system.conf.html
 	$(html-alias)
 
+man/udev_device_get_action.html: man/udev_device_get_syspath.html
+	$(html-alias)
+
+man/udev_device_get_devlinks_list_entry.html: man/udev_device_has_tag.html
+	$(html-alias)
+
+man/udev_device_get_devnode.html: man/udev_device_get_syspath.html
+	$(html-alias)
+
+man/udev_device_get_devnum.html: man/udev_device_get_syspath.html
+	$(html-alias)
+
+man/udev_device_get_devpath.html: man/udev_device_get_syspath.html
+	$(html-alias)
+
+man/udev_device_get_devtype.html: man/udev_device_get_syspath.html
+	$(html-alias)
+
+man/udev_device_get_driver.html: man/udev_device_get_syspath.html
+	$(html-alias)
+
+man/udev_device_get_is_initialized.html: man/udev_device_get_syspath.html
+	$(html-alias)
+
+man/udev_device_get_parent.html: man/udev_device_get_syspath.html
+	$(html-alias)
+
+man/udev_device_get_parent_with_subsystem_devtype.html: man/udev_device_get_syspath.html
+	$(html-alias)
+
+man/udev_device_get_properties_list_entry.html: man/udev_device_has_tag.html
+	$(html-alias)
+
+man/udev_device_get_property_value.html: man/udev_device_has_tag.html
+	$(html-alias)
+
+man/udev_device_get_subsystem.html: man/udev_device_get_syspath.html
+	$(html-alias)
+
+man/udev_device_get_sysattr_list_entry.html: man/udev_device_has_tag.html
+	$(html-alias)
+
+man/udev_device_get_sysattr_value.html: man/udev_device_has_tag.html
+	$(html-alias)
+
+man/udev_device_get_sysname.html: man/udev_device_get_syspath.html
+	$(html-alias)
+
+man/udev_device_get_sysnum.html: man/udev_device_get_syspath.html
+	$(html-alias)
+
+man/udev_device_get_tags_list_entry.html: man/udev_device_has_tag.html
+	$(html-alias)
+
+man/udev_device_get_udev.html: man/udev_device_get_syspath.html
+	$(html-alias)
+
+man/udev_device_new_from_device_id.html: man/udev_device_new_from_syspath.html
+	$(html-alias)
+
+man/udev_device_new_from_devnum.html: man/udev_device_new_from_syspath.html
+	$(html-alias)
+
+man/udev_device_new_from_environment.html: man/udev_device_new_from_syspath.html
+	$(html-alias)
+
+man/udev_device_new_from_subsystem_sysname.html: man/udev_device_new_from_syspath.html
+	$(html-alias)
+
+man/udev_device_ref.html: man/udev_device_new_from_syspath.html
+	$(html-alias)
+
+man/udev_device_set_sysattr_value.html: man/udev_device_has_tag.html
+	$(html-alias)
+
+man/udev_device_unref.html: man/udev_device_new_from_syspath.html
+	$(html-alias)
+
+man/udev_enumerate_add_match_is_initialized.html: man/udev_enumerate_add_match_subsystem.html
+	$(html-alias)
+
+man/udev_enumerate_add_match_parent.html: man/udev_enumerate_add_match_subsystem.html
+	$(html-alias)
+
+man/udev_enumerate_add_match_property.html: man/udev_enumerate_add_match_subsystem.html
+	$(html-alias)
+
+man/udev_enumerate_add_match_sysattr.html: man/udev_enumerate_add_match_subsystem.html
+	$(html-alias)
+
+man/udev_enumerate_add_match_sysname.html: man/udev_enumerate_add_match_subsystem.html
+	$(html-alias)
+
+man/udev_enumerate_add_match_tag.html: man/udev_enumerate_add_match_subsystem.html
+	$(html-alias)
+
+man/udev_enumerate_add_nomatch_subsystem.html: man/udev_enumerate_add_match_subsystem.html
+	$(html-alias)
+
+man/udev_enumerate_add_nomatch_sysattr.html: man/udev_enumerate_add_match_subsystem.html
+	$(html-alias)
+
+man/udev_enumerate_add_syspath.html: man/udev_enumerate_scan_devices.html
+	$(html-alias)
+
+man/udev_enumerate_get_list_entry.html: man/udev_enumerate_scan_devices.html
+	$(html-alias)
+
+man/udev_enumerate_get_udev.html: man/udev_enumerate_scan_devices.html
+	$(html-alias)
+
+man/udev_enumerate_ref.html: man/udev_enumerate_new.html
+	$(html-alias)
+
+man/udev_enumerate_scan_subsystems.html: man/udev_enumerate_scan_devices.html
+	$(html-alias)
+
+man/udev_enumerate_unref.html: man/udev_enumerate_new.html
+	$(html-alias)
+
+man/udev_list_entry_get_by_name.html: man/udev_list_entry.html
+	$(html-alias)
+
+man/udev_list_entry_get_name.html: man/udev_list_entry.html
+	$(html-alias)
+
+man/udev_list_entry_get_next.html: man/udev_list_entry.html
+	$(html-alias)
+
+man/udev_list_entry_get_value.html: man/udev_list_entry.html
+	$(html-alias)
+
+man/udev_monitor_enable_receiving.html: man/udev_monitor_receive_device.html
+	$(html-alias)
+
+man/udev_monitor_filter_add_match_subsystem_devtype.html: man/udev_monitor_filter_update.html
+	$(html-alias)
+
+man/udev_monitor_filter_add_match_tag.html: man/udev_monitor_filter_update.html
+	$(html-alias)
+
+man/udev_monitor_filter_remove.html: man/udev_monitor_filter_update.html
+	$(html-alias)
+
+man/udev_monitor_get_fd.html: man/udev_monitor_receive_device.html
+	$(html-alias)
+
+man/udev_monitor_get_udev.html: man/udev_monitor_receive_device.html
+	$(html-alias)
+
+man/udev_monitor_ref.html: man/udev_monitor_new_from_netlink.html
+	$(html-alias)
+
+man/udev_monitor_set_receive_buffer_size.html: man/udev_monitor_receive_device.html
+	$(html-alias)
+
+man/udev_monitor_unref.html: man/udev_monitor_new_from_netlink.html
+	$(html-alias)
+
+man/udev_ref.html: man/udev_new.html
+	$(html-alias)
+
+man/udev_unref.html: man/udev_new.html
+	$(html-alias)
+
 man/user.conf.d.html: man/systemd-system.conf.html
 	$(html-alias)
 
@@ -1708,6 +1995,7 @@ EXTRA_DIST += \
 	man/kernel-install.xml \
 	man/less-variables.xml \
 	man/libsystemd-pkgconfig.xml \
+	man/libudev.xml \
 	man/locale.conf.xml \
 	man/localectl.xml \
 	man/localtime.xml \
@@ -1891,6 +2179,17 @@ EXTRA_DIST += \
 	man/tmpfiles.d.xml \
 	man/udev.conf.xml \
 	man/udev.xml \
+	man/udev_device_get_syspath.xml \
+	man/udev_device_has_tag.xml \
+	man/udev_device_new_from_syspath.xml \
+	man/udev_enumerate_add_match_subsystem.xml \
+	man/udev_enumerate_new.xml \
+	man/udev_enumerate_scan_devices.xml \
+	man/udev_list_entry.xml \
+	man/udev_monitor_filter_update.xml \
+	man/udev_monitor_new_from_netlink.xml \
+	man/udev_monitor_receive_device.xml \
+	man/udev_new.xml \
 	man/udevadm.xml \
 	man/user-system-options.xml \
 	man/vconsole.conf.xml
diff --git a/man/libudev.xml b/man/libudev.xml
new file mode 100644
index 0000000..5660b9d
--- /dev/null
+++ b/man/libudev.xml
@@ -0,0 +1,125 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
+
+<!--
+  This file is part of systemd.
+
+  Copyright 2015 David Herrmann <dh.herrmann at gmail.com>
+
+  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
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="libudev"
+  xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>libudev</title>
+    <productname>systemd</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>David</firstname>
+        <surname>Herrmann</surname>
+        <email>dh.herrmann at gmail.com</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>libudev</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>libudev</refname>
+    <refpurpose>API for enumerating and introspecting local devices</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include <libudev.h></funcsynopsisinfo>
+    </funcsynopsis>
+
+    <cmdsynopsis>
+      <command>pkg-config --cflags --libs libudev</command>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><filename>libudev.h</filename> provides APIs to introspect
+    and enumerate devices on the local system.</para>
+
+    <para>All functions require a libudev context to operate. This
+    context can be create via
+    <citerefentry><refentrytitle>udev_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
+    It is used to track library state and link objects together. No
+    global state is used by libudev, everything is always linked to
+    a udev context. Furthermore, multiple different udev contexts can
+    be used in parallel by multiple threads. However, a single context
+    must not be accessed by multiple threads in parallel. The caller
+    is responsible of providing suitable locking if they intend to use
+    it from multiple threads.</para>
+
+    <para>To introspect a local device on a system, a udev device
+    object can be created via
+    <citerefentry><refentrytitle>udev_device_new_from_syspath</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    and friends. The device object allows to query current state,
+    read and write attributes and lookup properties of the device in
+    question.</para>
+
+    <para>To enumerate local devices on the system, an enumeration
+    object can be created via
+    <citerefentry><refentrytitle>udev_enumerate_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
+
+    <para>To monitor the local system for hotplugged or unplugged
+    devices, a monitor can be created via
+    <citerefentry><refentrytitle>udev_monitor_new_from_netlink</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
+
+    <para>Whenever libudev returns a list of objects, the
+    <citerefentry><refentrytitle>udev_list_entry</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    API should be used to iterate, access and modify those lists.</para>
+
+    <para>Furthermore, libudev also exports legacy APIs that should
+    not be used by new software (and as such are not documented as
+    part of this manual). This includes the hardware-database known
+    as <constant>udev_hwdb</constant> (please use the new
+    <citerefentry><refentrytitle>sd-hwdb</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    API instead) and the <constant>udev_queue</constant> object to
+    query the udev-daemon (which should not be used by new software
+    at all).</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+    <para>
+      <citerefentry><refentrytitle>udev_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_device_new_from_syspath</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_enumerate_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_monitor_new_from_netlink</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_list_entry</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd-device</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd-hwdb</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/man/udev_device_get_syspath.xml b/man/udev_device_get_syspath.xml
new file mode 100644
index 0000000..b3062ae
--- /dev/null
+++ b/man/udev_device_get_syspath.xml
@@ -0,0 +1,207 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
+
+<!--
+  This file is part of systemd.
+
+  Copyright 2015 David Herrmann <dh.herrmann at gmail.com>
+
+  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
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="udev_device_get_syspath"
+  xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>udev_device_get_syspath</title>
+    <productname>systemd</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>David</firstname>
+        <surname>Herrmann</surname>
+        <email>dh.herrmann at gmail.com</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>udev_device_get_syspath</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>udev_device_get_syspath</refname>
+    <refname>udev_device_get_sysname</refname>
+    <refname>udev_device_get_sysnum</refname>
+    <refname>udev_device_get_devpath</refname>
+    <refname>udev_device_get_devnode</refname>
+    <refname>udev_device_get_devnum</refname>
+    <refname>udev_device_get_devtype</refname>
+    <refname>udev_device_get_subsystem</refname>
+    <refname>udev_device_get_driver</refname>
+    <refname>udev_device_get_udev</refname>
+    <refname>udev_device_get_parent</refname>
+    <refname>udev_device_get_parent_with_subsystem_devtype</refname>
+    <refname>udev_device_get_is_initialized</refname>
+    <refname>udev_device_get_action</refname>
+
+    <refpurpose>Query device properties</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include <libudev.h></funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>const char *<function>udev_device_get_syspath</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>const char *<function>udev_device_get_sysname</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>const char *<function>udev_device_get_sysnum</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>const char *<function>udev_device_get_devpath</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>const char *<function>udev_device_get_devnode</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>dev_t <function>udev_device_get_devnum</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>const char *<function>udev_device_get_devtype</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>const char *<function>udev_device_get_subsystem</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>const char *<function>udev_device_get_driver</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev *<function>udev_device_get_udev</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev_device *<function>udev_device_get_parent</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev_device *<function>udev_device_get_parent_with_subsystem_devtype</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>udev_device_get_is_initialized</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>const char *<function>udev_device_get_action</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+        <paramdef>const char *<parameter>subsystem</parameter></paramdef>
+        <paramdef>const char *<parameter>devtype</parameter></paramdef>
+      </funcprototype>
+
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <!--<refsect1>
+    <title>Description</title>
+
+    <para>XXX: Add documentation.</para>
+  </refsect1>-->
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success, <function>udev_device_get_syspath()</function>,
+    <function>udev_device_get_sysname()</function>,
+    <function>udev_device_get_sysnum()</function>,
+    <function>udev_device_get_devpath()</function>,
+    <function>udev_device_get_devnode()</function>,
+    <function>udev_device_get_devtype()</function>,
+    <function>udev_device_get_subsystem()</function>,
+    <function>udev_device_get_driver()</function> and
+    <function>udev_device_get_action()</function> return a pointer
+    to a constant string that describes the requested property. The
+    lifetime of this string is bound to the device it was requested
+    on. On failure, each function may return
+    <constant>NULL</constant>.</para>
+
+    <para>On success, <function>udev_device_get_devnum()</function>
+    returns the device type of the passed device. On failure, a
+    device type with minor and major number set to
+    <constant>0</constant> is returned.</para>
+
+    <para><function>udev_device_get_udev()</function> always returns
+    a valid pointer to the udev context that this device belongs
+    to.</para>
+
+    <para>On success, <function>udev_device_get_parent()</function>
+    and
+    <function>udev_device_get_parent_with_subsystem_devtype()</function>
+    return a pointer to the parent device. No additional reference
+    to this device is acquired, but the child device owns a reference
+    to such parent device. On failure, <constant>NULL</constant>
+    is returned.</para>
+
+    <para>On success, <function>udev_device_get_is_initialized()</function>
+    returns either <constant>1</constant> or <constant>0</constant>,
+    depending on whether the passed device is initialized or not. On
+    failure, a negative error code is returned.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>udev_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_device_new_from_syspath</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_device_has_tag</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_enumerate_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_monitor_new_from_netlink</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_list_entry</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/man/udev_device_has_tag.xml b/man/udev_device_has_tag.xml
new file mode 100644
index 0000000..4802573
--- /dev/null
+++ b/man/udev_device_has_tag.xml
@@ -0,0 +1,163 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
+
+<!--
+  This file is part of systemd.
+
+  Copyright 2015 David Herrmann <dh.herrmann at gmail.com>
+
+  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
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="udev_device_has_tag"
+  xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>udev_device_has_tag</title>
+    <productname>systemd</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>David</firstname>
+        <surname>Herrmann</surname>
+        <email>dh.herrmann at gmail.com</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>udev_device_has_tag</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>udev_device_has_tag</refname>
+    <refname>udev_device_get_devlinks_list_entry</refname>
+    <refname>udev_device_get_properties_list_entry</refname>
+    <refname>udev_device_get_tags_list_entry</refname>
+    <refname>udev_device_get_sysattr_list_entry</refname>
+    <refname>udev_device_get_property_value</refname>
+    <refname>udev_device_get_sysattr_value</refname>
+    <refname>udev_device_set_sysattr_value</refname>
+
+    <refpurpose>Retrieve or set device attributes</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include <libudev.h></funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>struct udev_list_entry *<function>udev_device_get_devlinks_list_entry</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev_list_entry *<function>udev_device_get_properties_list_entry</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev_list_entry *<function>udev_device_get_tags_list_entry</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev_list_entry *<function>udev_device_get_sysattr_list_entry</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>const char *<function>udev_device_get_property_value</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+        <paramdef>const char *<parameter>key</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>udev_device_has_tag</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+        <paramdef>const char *<parameter>tag</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>const char *<function>udev_device_get_sysattr_value</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+        <paramdef>const char *<parameter>sysattr</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>udev_device_set_sysattr_value</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+        <paramdef>const char *<parameter>sysattr</parameter></paramdef>
+        <paramdef>const char *<parameter>value</parameter></paramdef>
+      </funcprototype>
+
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <!--<refsect1>
+    <title>Description</title>
+
+    <para>XXX: Add short description.</para>
+  </refsect1>-->
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success,
+    <function>udev_device_get_devlinks_list_entry()</function>,
+    <function>udev_device_get_properties_list_entry()</function>,
+    <function>udev_device_get_tags_list_entry()</function> and
+    <function>udev_device_get_sysattr_list_entry()</function> return
+    a pointer to the first entry of the retrieved list. If that list
+    is empty, or if an error occurred, <constant>NULL</constant> is
+    returned.</para>
+
+    <para>On success,
+    <function>udev_device_get_property_value()</function> and
+    <function>udev_device_get_sysattr_value()</function> return a
+    pointer to a constant string of the requested value. On error,
+    <constant>NULL</constant> is returned.</para>
+
+    <para>On success,
+    <function>udev_device_set_sysattr_value()</function> returns
+    an integer greater than, or equal to, <constant>0</constant>.
+    On failure, a negative error code is returned.</para>
+
+    <para>On success, <function>udev_device_has_tag()</function>
+    returns <constant>1</constant> or <constant>0</constant>,
+    depending on whether the device has the given tag or not.
+    On failure, a negative error code is returned.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>udev_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_device_new_from_syspath</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_device_get_syspath</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_enumerate_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_monitor_new_from_netlink</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_list_entry</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/man/udev_device_new_from_syspath.xml b/man/udev_device_new_from_syspath.xml
new file mode 100644
index 0000000..c3c0d76
--- /dev/null
+++ b/man/udev_device_new_from_syspath.xml
@@ -0,0 +1,145 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
+
+<!--
+  This file is part of systemd.
+
+  Copyright 2015 David Herrmann <dh.herrmann at gmail.com>
+
+  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
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="udev_device_new_from_syspath"
+  xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>udev_device_new_from_syspath</title>
+    <productname>systemd</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>David</firstname>
+        <surname>Herrmann</surname>
+        <email>dh.herrmann at gmail.com</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>udev_device_new_from_syspath</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>udev_device_new_from_syspath</refname>
+    <refname>udev_device_new_from_devnum</refname>
+    <refname>udev_device_new_from_subsystem_sysname</refname>
+    <refname>udev_device_new_from_device_id</refname>
+    <refname>udev_device_new_from_environment</refname>
+    <refname>udev_device_ref</refname>
+    <refname>udev_device_unref</refname>
+
+    <refpurpose>Create, acquire and release a udev device object</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include <libudev.h></funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>struct udev_device *<function>udev_device_new_from_syspath</function></funcdef>
+        <paramdef>struct udev *<parameter>udev</parameter></paramdef>
+        <paramdef>const char *<parameter>syspath</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev_device *<function>udev_device_new_from_devnum</function></funcdef>
+        <paramdef>struct udev *<parameter>udev</parameter></paramdef>
+        <paramdef>char <parameter>type</parameter></paramdef>
+        <paramdef>dev_t <parameter>devnum</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev_device *<function>udev_device_new_from_subsystem_sysname</function></funcdef>
+        <paramdef>struct udev *<parameter>udev</parameter></paramdef>
+        <paramdef>const char *<parameter>subsystem</parameter></paramdef>
+        <paramdef>const char *<parameter>sysname</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev_device *<function>udev_device_new_from_device_id</function></funcdef>
+        <paramdef>struct udev *<parameter>udev</parameter></paramdef>
+        <paramdef>const char *<parameter>id</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev_device *<function>udev_device_new_from_environment</function></funcdef>
+        <paramdef>struct udev *<parameter>udev</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev_device *<function>udev_device_ref</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev_device *<function>udev_device_unref</function></funcdef>
+        <paramdef>struct udev_device *<parameter>udev_device</parameter></paramdef>
+      </funcprototype>
+
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <!--<refsect1>
+    <title>Description</title>
+
+    <para>XXX: Add some description.</para>
+  </refsect1>-->
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success, <function>udev_device_new_from_syspath()</function>,
+    <function>udev_device_new_from_devnum()</function>,
+    <function>udev_device_new_from_subsystem_sysname()</function>,
+    <function>udev_device_new_from_device_id()</function> and
+    <function>udev_device_new_from_environment()</function> return a
+    pointer to the allocated udev device. On failure,
+    <constant>NULL</constant> is returned.
+    <function>udev_device_ref()</function> returns the argument
+    that it was passed, unmodified.
+    <function>udev_device_unref()</function> always returns
+    <constant>NULL</constant>.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>udev_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_device_get_syspath</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_device_has_tag</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_enumerate_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_monitor_new_from_netlink</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_list_entry</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/man/udev_enumerate_add_match_subsystem.xml b/man/udev_enumerate_add_match_subsystem.xml
new file mode 100644
index 0000000..5acce00
--- /dev/null
+++ b/man/udev_enumerate_add_match_subsystem.xml
@@ -0,0 +1,163 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
+
+<!--
+  This file is part of systemd.
+
+  Copyright 2015 David Herrmann <dh.herrmann at gmail.com>
+
+  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
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="udev_enumerate_add_match_subsystem"
+  xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>udev_enumerate_add_match_subsystem</title>
+    <productname>systemd</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>David</firstname>
+        <surname>Herrmann</surname>
+        <email>dh.herrmann at gmail.com</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>udev_enumerate_add_match_subsystem</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>udev_enumerate_add_match_subsystem</refname>
+    <refname>udev_enumerate_add_nomatch_subsystem</refname>
+    <refname>udev_enumerate_add_match_sysattr</refname>
+    <refname>udev_enumerate_add_nomatch_sysattr</refname>
+    <refname>udev_enumerate_add_match_property</refname>
+    <refname>udev_enumerate_add_match_sysname</refname>
+    <refname>udev_enumerate_add_match_tag</refname>
+    <refname>udev_enumerate_add_match_parent</refname>
+    <refname>udev_enumerate_add_match_is_initialized</refname>
+
+    <refpurpose>Modify filters</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include <libudev.h></funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>int <function>udev_enumerate_add_match_subsystem</function></funcdef>
+        <paramdef>struct udev_enumerate *<parameter>udev_enumerate</parameter></paramdef>
+        <paramdef>const char *<parameter>subsystem</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>udev_enumerate_add_nomatch_subsystem</function></funcdef>
+        <paramdef>struct udev_enumerate *<parameter>udev_enumerate</parameter></paramdef>
+        <paramdef>const char *<parameter>subsystem</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>udev_enumerate_add_match_sysattr</function></funcdef>
+        <paramdef>struct udev_enumerate *<parameter>udev_enumerate</parameter></paramdef>
+        <paramdef>const char *<parameter>sysattr</parameter></paramdef>
+        <paramdef>const char *<parameter>value</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>udev_enumerate_add_nomatch_sysattr</function></funcdef>
+        <paramdef>struct udev_enumerate *<parameter>udev_enumerate</parameter></paramdef>
+        <paramdef>const char *<parameter>sysattr</parameter></paramdef>
+        <paramdef>const char *<parameter>value</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>udev_enumerate_add_match_property</function></funcdef>
+        <paramdef>struct udev_enumerate *<parameter>udev_enumerate</parameter></paramdef>
+        <paramdef>const char *<parameter>property</parameter></paramdef>
+        <paramdef>const char *<parameter>value</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>udev_enumerate_add_match_sysname</function></funcdef>
+        <paramdef>struct udev_enumerate *<parameter>udev_enumerate</parameter></paramdef>
+        <paramdef>const char *<parameter>sysname</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>udev_enumerate_add_match_tag</function></funcdef>
+        <paramdef>struct udev_enumerate *<parameter>udev_enumerate</parameter></paramdef>
+        <paramdef>const char *<parameter>tag</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>udev_enumerate_add_match_parent</function></funcdef>
+        <paramdef>struct udev_enumerate *<parameter>udev_enumerate</parameter></paramdef>
+        <paramdef>struct udev_device *<parameter>parent</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>udev_enumerate_add_match_is_initialized</function></funcdef>
+        <paramdef>struct udev_enumerate *<parameter>udev_enumerate</parameter></paramdef>
+      </funcprototype>
+
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <!--<refsect1>
+    <title>Description</title>
+
+    <para>XXX: Add short description.</para>
+  </refsect1>-->
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success,
+    <function>udev_enumerate_add_match_subsystem</function>,
+    <function>udev_enumerate_add_nomatch_subsystem</function>,
+    <function>udev_enumerate_add_match_sysattr</function>,
+    <function>udev_enumerate_add_nomatch_sysattr</function>,
+    <function>udev_enumerate_add_match_property</function>,
+    <function>udev_enumerate_add_match_sysname</function>,
+    <function>udev_enumerate_add_match_tag</function>,
+    <function>udev_enumerate_add_match_parent</function> and
+    <function>udev_enumerate_add_match_is_initialized</function>
+    return an integer greater than, or equal to,
+    <constant>0</constant>.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>udev_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_device_new_from_syspath</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_enumerate_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_enumerate_scan_devices</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_monitor_new_from_netlink</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_list_entry</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/man/udev_enumerate_new.xml b/man/udev_enumerate_new.xml
new file mode 100644
index 0000000..b5856c5
--- /dev/null
+++ b/man/udev_enumerate_new.xml
@@ -0,0 +1,111 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
+
+<!--
+  This file is part of systemd.
+
+  Copyright 2015 David Herrmann <dh.herrmann at gmail.com>
+
+  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
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="udev_enumerate_new"
+  xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>udev_enumerate_new</title>
+    <productname>systemd</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>David</firstname>
+        <surname>Herrmann</surname>
+        <email>dh.herrmann at gmail.com</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>udev_enumerate_new</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>udev_enumerate_new</refname>
+    <refname>udev_enumerate_ref</refname>
+    <refname>udev_enumerate_unref</refname>
+
+    <refpurpose>Create, acquire and release a udev enumerate object</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include <libudev.h></funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>struct udev_enumerate *<function>udev_enumerate_new</function></funcdef>
+        <paramdef>struct udev *<parameter>udev</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev_enumerate *<function>udev_enumerate_ref</function></funcdef>
+        <paramdef>struct udev_enumerate *<parameter>udev_enumerate</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev_enumerate *<function>udev_enumerate_unref</function></funcdef>
+        <paramdef>struct udev_enumerate *<parameter>udev_enumerate</parameter></paramdef>
+      </funcprototype>
+
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <!--<refsect1>
+    <title>Description</title>
+
+    <para>XXX: Add short description.</para>
+  </refsect1>-->
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success, <function>udev_enumerate_new()</function> returns a
+    pointer to the allocated udev monitor. On failure,
+    <constant>NULL</constant> is returned.
+    <function>udev_enumerate_ref()</function> returns the argument
+    that it was passed, unmodified.
+    <function>udev_enumerate_unref()</function> always returns
+    <constant>NULL</constant>.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>udev_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_device_new_from_syspath</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_enumerate_add_match_subsystem</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_enumerate_scan_devices</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_monitor_new_from_netlink</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_list_entry</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/man/udev_enumerate_scan_devices.xml b/man/udev_enumerate_scan_devices.xml
new file mode 100644
index 0000000..73566f5
--- /dev/null
+++ b/man/udev_enumerate_scan_devices.xml
@@ -0,0 +1,133 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
+
+<!--
+  This file is part of systemd.
+
+  Copyright 2015 David Herrmann <dh.herrmann at gmail.com>
+
+  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
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="udev_enumerate_scan_devices"
+  xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>udev_enumerate_scan_devices</title>
+    <productname>systemd</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>David</firstname>
+        <surname>Herrmann</surname>
+        <email>dh.herrmann at gmail.com</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>udev_enumerate_scan_devices</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>udev_enumerate_scan_devices</refname>
+    <refname>udev_enumerate_scan_subsystems</refname>
+    <refname>udev_enumerate_get_list_entry</refname>
+    <refname>udev_enumerate_add_syspath</refname>
+    <refname>udev_enumerate_get_udev</refname>
+
+    <refpurpose>Query or modify a udev enumerate object</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include <libudev.h></funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>int <function>udev_enumerate_scan_devices</function></funcdef>
+        <paramdef>struct udev_enumerate *<parameter>udev_enumerate</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>udev_enumerate_scan_subsystems</function></funcdef>
+        <paramdef>struct udev_enumerate *<parameter>udev_enumerate</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev_list_entry *<function>udev_enumerate_get_list_entry</function></funcdef>
+        <paramdef>struct udev_enumerate *<parameter>udev_enumerate</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>udev_enumerate_add_syspath</function></funcdef>
+        <paramdef>struct udev_enumerate *<parameter>udev_enumerate</parameter></paramdef>
+        <paramdef>const char *<parameter>syspath</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev *<function>udev_enumerate_get_udev</function></funcdef>
+        <paramdef>struct udev_enumerate *<parameter>udev_enumerate</parameter></paramdef>
+      </funcprototype>
+
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <!--<refsect1>
+    <title>Description</title>
+
+    <para>XXX: Add short description.</para>
+  </refsect1>-->
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success,
+    <function>udev_enumerate_scan_devices()</function>,
+    <function>udev_enumerate_scan_subsystems()</function> and
+    <function>udev_enumerate_add_syspath()</function>
+    return an integer greater than, or equal to,
+    <constant>0</constant>.</para>
+
+    <para>On success,
+    <function>udev_enumerate_get_list_entry()</function>
+    returns a pointer to the first entry in the list of found
+    devices. If the list is empty, or on failure,
+    <constant>NULL</constant> is returned.</para>
+
+    <para><function>udev_enumerate_get_udev()</function> always
+    returns a pointer to the udev context that this enumerate
+    object is associated with.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>udev_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_device_new_from_syspath</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_enumerate_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_enumerate_add_match_subsystem</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_monitor_new_from_netlink</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_list_entry</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/man/udev_list_entry.xml b/man/udev_list_entry.xml
new file mode 100644
index 0000000..6e033bd
--- /dev/null
+++ b/man/udev_list_entry.xml
@@ -0,0 +1,123 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
+
+<!--
+  This file is part of systemd.
+
+  Copyright 2015 David Herrmann <dh.herrmann at gmail.com>
+
+  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
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="udev_list_entry"
+  xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>udev_list_entry</title>
+    <productname>systemd</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>David</firstname>
+        <surname>Herrmann</surname>
+        <email>dh.herrmann at gmail.com</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>udev_list_entry</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>udev_list_entry</refname>
+    <refname>udev_list_entry_get_next</refname>
+    <refname>udev_list_entry_get_by_name</refname>
+    <refname>udev_list_entry_get_name</refname>
+    <refname>udev_list_entry_get_value</refname>
+
+    <refpurpose>Iterate and access udev lists</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include <libudev.h></funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>struct udev_list_entry *<function>udev_list_entry_get_next</function></funcdef>
+        <paramdef>struct udev_list_entry *<parameter>list_entry</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev_list_entry *<function>udev_list_entry_get_by_name</function></funcdef>
+        <paramdef>struct udev_list_entry *<parameter>list_entry</parameter></paramdef>
+        <paramdef>const char *<parameter>name</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>const char *<function>udev_list_entry_get_name</function></funcdef>
+        <paramdef>struct udev_list_entry *<parameter>list_entry</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>const char *<function>udev_list_entry_get_value</function></funcdef>
+        <paramdef>struct udev_list_entry *<parameter>list_entry</parameter></paramdef>
+      </funcprototype>
+
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <!--<refsect1>
+    <title>Description</title>
+
+    <para>XXX: Add short description.</para>
+  </refsect1>-->
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success,
+    <function>udev_list_entry_get_next()</function> and
+    <function>udev_list_entry_get_by_name()</function> return
+    a pointer to the requested list entry. If no such entry can
+    be found, or on failure, <constant>NULL</constant> is
+    returned.</para>
+
+    <para>On success,
+    <function>udev_list_entry_get_name()</function> and
+    <function>udev_list_entry_get_value()</function> return a
+    pointer to a constant string representing the requested value.
+    The string is bound to the lifetime of the list-entry itself.
+    On failure, <constant>NULL</constant> is returned.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>udev_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_device_new_from_syspath</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_enumerate_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_monitor_new_from_netlink</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/man/udev_monitor_filter_update.xml b/man/udev_monitor_filter_update.xml
new file mode 100644
index 0000000..f129595
--- /dev/null
+++ b/man/udev_monitor_filter_update.xml
@@ -0,0 +1,122 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
+
+<!--
+  This file is part of systemd.
+
+  Copyright 2015 David Herrmann <dh.herrmann at gmail.com>
+
+  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
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="udev_monitor_filter_update"
+  xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>udev_monitor_filter_update</title>
+    <productname>systemd</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>David</firstname>
+        <surname>Herrmann</surname>
+        <email>dh.herrmann at gmail.com</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>udev_monitor_filter_update</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>udev_monitor_filter_update</refname>
+    <refname>udev_monitor_filter_remove</refname>
+    <refname>udev_monitor_filter_add_match_subsystem_devtype</refname>
+    <refname>udev_monitor_filter_add_match_tag</refname>
+
+    <refpurpose>Modify filters</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include <libudev.h></funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>int <function>udev_monitor_filter_update</function></funcdef>
+        <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>udev_monitor_filter_remove</function></funcdef>
+        <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>udev_monitor_filter_add_match_subsystem_devtype</function></funcdef>
+        <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
+        <paramdef>const char *<parameter>subsystem</parameter></paramdef>
+        <paramdef>const char *<parameter>devtype</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>udev_monitor_filter_add_match_tag</function></funcdef>
+        <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
+        <paramdef>const char *<parameter>tag</parameter></paramdef>
+      </funcprototype>
+
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <!--<refsect1>
+    <title>Description</title>
+
+    <para>XXX: Add short description.</para>
+  </refsect1>-->
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success,
+    <function>udev_monitor_filter_update()</function>,
+    <function>udev_monitor_filter_remove()</function>,
+    <function>udev_monitor_filter_add_match_subsystem_devtype()</function>
+    and
+    <function>udev_monitor_filter_add_match_tag()</function>
+    return an integer greater than, or equal to,
+    <constant>0</constant>. On failure, a negative error code is
+    returned.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>udev_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_device_new_from_syspath</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_enumerate_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_monitor_new_from_netlink</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_monitor_receive_device</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_list_entry</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/man/udev_monitor_new_from_netlink.xml b/man/udev_monitor_new_from_netlink.xml
new file mode 100644
index 0000000..d73a4ac
--- /dev/null
+++ b/man/udev_monitor_new_from_netlink.xml
@@ -0,0 +1,113 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
+
+<!--
+  This file is part of systemd.
+
+  Copyright 2015 David Herrmann <dh.herrmann at gmail.com>
+
+  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
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="udev_monitor_new_from_netlink"
+  xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>udev_monitor_new_from_netlink</title>
+    <productname>systemd</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>David</firstname>
+        <surname>Herrmann</surname>
+        <email>dh.herrmann at gmail.com</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>udev_monitor_new_from_netlink</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>udev_monitor_new_from_netlink</refname>
+    <refname>udev_monitor_ref</refname>
+    <refname>udev_monitor_unref</refname>
+
+    <refpurpose>Create, acquire and release a udev monitor object</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include <libudev.h></funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>struct udev_monitor *<function>udev_monitor_new_from_netlink</function></funcdef>
+        <paramdef>struct udev *<parameter>udev</parameter></paramdef>
+        <paramdef>const char *<parameter>name</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev_monitor *<function>udev_monitor_ref</function></funcdef>
+        <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev_monitor *<function>udev_monitor_unref</function></funcdef>
+        <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
+      </funcprototype>
+
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <!--<refsect1>
+    <title>Description</title>
+
+    <para>XXX: Add short description.</para>
+  </refsect1>-->
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success,
+    <function>udev_monitor_new_from_netlink()</function> returns a
+    pointer to the allocated udev monitor. On failure,
+    <constant>NULL</constant> is returned.
+    <function>udev_monitor_ref()</function> returns the argument
+    that it was passed, unmodified.
+    <function>udev_monitor_unref()</function> always returns
+    <constant>NULL</constant>.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>udev_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_device_new_from_syspath</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_enumerate_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_monitor_filter_update</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_monitor_receive_device</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_list_entry</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/man/udev_monitor_receive_device.xml b/man/udev_monitor_receive_device.xml
new file mode 100644
index 0000000..7e842f8
--- /dev/null
+++ b/man/udev_monitor_receive_device.xml
@@ -0,0 +1,137 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
+
+<!--
+  This file is part of systemd.
+
+  Copyright 2015 David Herrmann <dh.herrmann at gmail.com>
+
+  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
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="udev_monitor_receive_device"
+  xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>udev_monitor_receive_device</title>
+    <productname>systemd</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>David</firstname>
+        <surname>Herrmann</surname>
+        <email>dh.herrmann at gmail.com</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>udev_monitor_receive_device</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>udev_monitor_receive_device</refname>
+    <refname>udev_monitor_enable_receiving</refname>
+    <refname>udev_monitor_set_receive_buffer_size</refname>
+    <refname>udev_monitor_get_fd</refname>
+    <refname>udev_monitor_get_udev</refname>
+
+    <refpurpose>Query and modify device monitor</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include <libudev.h></funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>struct udev_device *<function>udev_monitor_receive_device</function></funcdef>
+        <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>udev_monitor_enable_receiving</function></funcdef>
+        <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>udev_monitor_set_receive_buffer_size</function></funcdef>
+        <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
+        <paramdef>int <parameter>size</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>udev_monitor_get_fd</function></funcdef>
+        <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev *<function>udev_monitor_get_udev</function></funcdef>
+        <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
+      </funcprototype>
+
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <!--<refsect1>
+    <title>Description</title>
+
+    <para>XXX: Add short description.</para>
+  </refsect1>-->
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success,
+    <function>udev_monitor_receive_device()</function> returns a
+    pointer to a newly referenced device that was received via the
+    monitor. The caller is responsible to drop this reference when
+    done. On failure, <constant>NULL</constant> is returned.</para>
+
+    <para>On success,
+    <function>udev_monitor_enable_receiving()</function> and
+    <function>udev_monitor_set_receive_buffer_size()</function>
+    return an integer greater than, or equal to,
+    <constant>0</constant>. On failure, a negative error code is
+    returned.</para>
+
+    <para>On success, <function>udev_monitor_get_fd()</function>
+    returns the file descriptor used by this monitor. On failure,
+    a negative error code is returned.</para>
+
+    <para><function>udev_monitor_get_udev()</function> always returns
+    a pointer to the udev context that this monitor is associated
+    with.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>udev_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_device_new_from_syspath</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_enumerate_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_monitor_new_from_netlink</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_monitor_filter_update</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev_list_entry</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/man/udev_new.xml b/man/udev_new.xml
new file mode 100644
index 0000000..587835a
--- /dev/null
+++ b/man/udev_new.xml
@@ -0,0 +1,110 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
+
+<!--
+  This file is part of systemd.
+
+  Copyright 2015 David Herrmann <dh.herrmann at gmail.com>
+
+  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
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="udev_new"
+  xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>udev_new</title>
+    <productname>systemd</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>David</firstname>
+        <surname>Herrmann</surname>
+        <email>dh.herrmann at gmail.com</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>udev_new</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>udev_new</refname>
+    <refname>udev_ref</refname>
+    <refname>udev_unref</refname>
+
+    <refpurpose>Create, acquire and release a udev context object</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include <libudev.h></funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>struct udev *<function>udev_new</function></funcdef>
+        <paramdef><parameter>void</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev *<function>udev_ref</function></funcdef>
+        <paramdef>struct udev *<parameter>udev</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>struct udev *<function>udev_unref</function></funcdef>
+        <paramdef>struct udev *<parameter>udev</parameter></paramdef>
+      </funcprototype>
+
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><function>udev_new()</function> allocates a new udev context
+    object and returns a pointer to it. This object is opaque and must
+    not be accessed by the caller via different means than functions
+    provided by libudev. Initially, the reference count of the context
+    is 1. You can acquire further references, and drop gained references
+    via <function>udev_ref()</function> and
+    <function>udev_unref()</function>. Once the reference count hits 0,
+    the context object is destroyed and freed.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success, <function>udev_new()</function> returns a pointer
+    to the allocated udev context. On failure, <constant>NULL</constant>
+    is returned. <function>udev_ref()</function> returns the argument
+    that it was passed, unmodified. <function>udev_unref()</function>
+    always returns <constant>NULL</constant>.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+    </para>
+  </refsect1>
+
+</refentry>

commit f1398fa59cd5b799b6be6e30c9d49ef98e8298a3
Merge: ed443d9 2bf25ee
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Jun 17 15:19:12 2015 +0200

    Merge pull request #176 from filbranden/test_cgroup_mask1
    
    test-cgroup-mask: unit_get_sibling_mask ignores cgroup_supported


commit ed443d98626032eef8a27b8753802cdb518138a3
Merge: afc4290 d6e5f3a
Author: Kay Sievers <kay at vrfy.org>
Date:   Wed Jun 17 15:09:32 2015 +0200

    Merge pull request #251 from zonque/signal
    
    core: execute: fix regression in pam_setup()


commit d6e5f3ad1fdb7964d843c86f86d4ee7d806a0f93
Author: Daniel Mack <daniel at zonque.org>
Date:   Wed Jun 17 14:31:49 2015 +0200

    core: execute: fix regression in pam_setup()
    
    Commit 72c0a2c25 ("everywhere: port everything to sigprocmask_many()
    and friends") reworked code tree-wide to use the new sigprocmask_many()
    helper. In this, it caused a regression in pam_setup, because it
    dropped a line to initialize the 'ss' signal mask which is later used
    in sigwait().
    
    While at it, move the variable declaration to an inner scope.

diff --git a/src/core/execute.c b/src/core/execute.c
index 444865d..a6ff5ac 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -771,7 +771,7 @@ static int setup_pam(
         };
 
         pam_handle_t *handle = NULL;
-        sigset_t ss, old_ss;
+        sigset_t old_ss;
         int pam_code = PAM_SUCCESS;
         int err;
         char **e = NULL;
@@ -868,6 +868,11 @@ static int setup_pam(
                 /* Check if our parent process might already have
                  * died? */
                 if (getppid() == parent_pid) {
+                        sigset_t ss;
+
+                        assert_se(sigemptyset(&ss) >= 0);
+                        assert_se(sigaddset(&ss, SIGTERM) >= 0);
+
                         for (;;) {
                                 if (sigwait(&ss, &sig) < 0) {
                                         if (errno == EINTR)

commit b0f5a5105ba3e57c20528ee2c292cd1f7300da8f
Author: Umut Tezduyar Lindskog <umuttl at axis.com>
Date:   Tue Jun 16 08:46:25 2015 +0200

    man: explain max CPU load on cgtop

diff --git a/man/systemd-cgtop.xml b/man/systemd-cgtop.xml
index d145644..969edd0 100644
--- a/man/systemd-cgtop.xml
+++ b/man/systemd-cgtop.xml
@@ -85,6 +85,11 @@
     <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>
     for details.</para>
 
+    <para>The CPU load value can be between 0 and 100 times the number of
+    processors the system has. For example, if the system has 8 processors,
+    the CPU load value is going to be between 0% and 800%. The number of
+    processors can be found in <literal>/proc/cpuinfo</literal>.</para>
+
     <para>To emphasize this: unless
     <literal>CPUAccounting=1</literal>,
     <literal>MemoryAccounting=1</literal> and

commit afc4290e2c48b8a0803247880b6382d639990504
Merge: 49b5949 11c9f1e
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Jun 17 13:08:15 2015 +0200

    Merge pull request #246 from smcv/xpg-not-xdg
    
    Stop talking about the "XDG" version of basename()


commit 49b59497485887e8ec3af8875f54f02fadb56203
Merge: 9d8a5fd 48f69d8
Author: Daniel Mack <github at zonque.org>
Date:   Wed Jun 17 12:55:18 2015 +0200

    Merge pull request #245 from poettering/always-sdbus-man-pages
    
    man: always build sd-bus man pages, even if kdbus is disabled


commit 48f69d8fb4d0cf34d578352572c96d86e13caa79
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Jun 17 12:32:33 2015 +0200

    man: always build sd-bus man pages, even if kdbus is disabled
    
    After all, we now moved sd-bus out of the kdbus conditional, hence the
    man pages should be too.

diff --git a/man/sd_bus_creds_get_pid.xml b/man/sd_bus_creds_get_pid.xml
index 8a193d5..b9e0811 100644
--- a/man/sd_bus_creds_get_pid.xml
+++ b/man/sd_bus_creds_get_pid.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_bus_creds_get_pid" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_creds_get_pid">
 
   <refentryinfo>
     <title>sd_bus_creds_get_pid</title>
diff --git a/man/sd_bus_creds_new_from_pid.xml b/man/sd_bus_creds_new_from_pid.xml
index 695d4e1..36b6bef 100644
--- a/man/sd_bus_creds_new_from_pid.xml
+++ b/man/sd_bus_creds_new_from_pid.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_bus_creds_new_from_pid" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_creds_new_from_pid">
 
   <refentryinfo>
     <title>sd_bus_creds_new_from_pid</title>
diff --git a/man/sd_bus_default.xml b/man/sd_bus_default.xml
index 55f1b8b..ae0b1a0 100644
--- a/man/sd_bus_default.xml
+++ b/man/sd_bus_default.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_bus_default" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_default">
 
   <refentryinfo>
     <title>sd_bus_default</title>
diff --git a/man/sd_bus_error.xml b/man/sd_bus_error.xml
index bd2a279..762f0c0 100644
--- a/man/sd_bus_error.xml
+++ b/man/sd_bus_error.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_bus_error" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_error">
 
   <refentryinfo>
     <title>sd_bus_error</title>
diff --git a/man/sd_bus_message_append.xml b/man/sd_bus_message_append.xml
index 91a8079..5025bdf 100644
--- a/man/sd_bus_message_append.xml
+++ b/man/sd_bus_message_append.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_bus_message_append" conditional="ENABLE_KDBUS"
+<refentry id="sd_bus_message_append"
           xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
diff --git a/man/sd_bus_message_append_array.xml b/man/sd_bus_message_append_array.xml
index 5409893..fc5ee23 100644
--- a/man/sd_bus_message_append_array.xml
+++ b/man/sd_bus_message_append_array.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_bus_message_append_array" conditional="ENABLE_KDBUS"
+<refentry id="sd_bus_message_append_array"
           xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
diff --git a/man/sd_bus_message_append_basic.xml b/man/sd_bus_message_append_basic.xml
index 81ac6de..82c6957 100644
--- a/man/sd_bus_message_append_basic.xml
+++ b/man/sd_bus_message_append_basic.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_bus_message_append_basic" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_message_append_basic">
 
   <refentryinfo>
     <title>sd_bus_message_append_basic</title>
diff --git a/man/sd_bus_message_append_string_memfd.xml b/man/sd_bus_message_append_string_memfd.xml
index 1fecbd5..61c513a 100644
--- a/man/sd_bus_message_append_string_memfd.xml
+++ b/man/sd_bus_message_append_string_memfd.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_bus_message_append_string_memfd" conditional="ENABLE_KDBUS"
+<refentry id="sd_bus_message_append_string_memfd"
           xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
diff --git a/man/sd_bus_message_append_strv.xml b/man/sd_bus_message_append_strv.xml
index d986b06..57a6864 100644
--- a/man/sd_bus_message_append_strv.xml
+++ b/man/sd_bus_message_append_strv.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_bus_message_append_strv" conditional="ENABLE_KDBUS"
+<refentry id="sd_bus_message_append_strv"
           xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
diff --git a/man/sd_bus_message_get_cookie.xml b/man/sd_bus_message_get_cookie.xml
index 7795acf..7f762a3 100644
--- a/man/sd_bus_message_get_cookie.xml
+++ b/man/sd_bus_message_get_cookie.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_bus_message_get_cookie" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_message_get_cookie">
 
   <refentryinfo>
     <title>sd_bus_message_get_cookie</title>
diff --git a/man/sd_bus_message_get_monotonic_usec.xml b/man/sd_bus_message_get_monotonic_usec.xml
index c109fe1..c8deecf 100644
--- a/man/sd_bus_message_get_monotonic_usec.xml
+++ b/man/sd_bus_message_get_monotonic_usec.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_bus_message_get_monotonic_usec" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_message_get_monotonic_usec">
 
   <refentryinfo>
     <title>sd_bus_message_get_monotonic_usec</title>
diff --git a/man/sd_bus_negotiate_fds.xml b/man/sd_bus_negotiate_fds.xml
index 4f9204e..d31cb57 100644
--- a/man/sd_bus_negotiate_fds.xml
+++ b/man/sd_bus_negotiate_fds.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_bus_negotiate_fds" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_negotiate_fds">
 
   <refentryinfo>
     <title>sd_bus_negotiate_fds</title>
diff --git a/man/sd_bus_new.xml b/man/sd_bus_new.xml
index bc91dd2..c1d82bb 100644
--- a/man/sd_bus_new.xml
+++ b/man/sd_bus_new.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_bus_new" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_new">
 
   <refentryinfo>
     <title>sd_bus_new</title>
diff --git a/man/sd_bus_path_encode.xml b/man/sd_bus_path_encode.xml
index 0a6ac80..41c35bd 100644
--- a/man/sd_bus_path_encode.xml
+++ b/man/sd_bus_path_encode.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_bus_path_encode" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_path_encode">
 
   <refentryinfo>
     <title>sd_bus_path_encode</title>
diff --git a/man/sd_bus_request_name.xml b/man/sd_bus_request_name.xml
index 78b440b..a7dc9fe 100644
--- a/man/sd_bus_request_name.xml
+++ b/man/sd_bus_request_name.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_bus_request_name" conditional="ENABLE_KDBUS">
+<refentry id="sd_bus_request_name">
 
   <refentryinfo>
     <title>sd_bus_request_name</title>
diff --git a/man/sd_event_add_child.xml b/man/sd_event_add_child.xml
index 7de9f40..6b53c84 100644
--- a/man/sd_event_add_child.xml
+++ b/man/sd_event_add_child.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_event_add_child" conditional="ENABLE_KDBUS">
+<refentry id="sd_event_add_child">
 
   <refentryinfo>
     <title>sd_event_add_child</title>
diff --git a/man/sd_event_add_defer.xml b/man/sd_event_add_defer.xml
index 4aabc07..b991b38 100644
--- a/man/sd_event_add_defer.xml
+++ b/man/sd_event_add_defer.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_event_add_defer" conditional="ENABLE_KDBUS">
+<refentry id="sd_event_add_defer">
 
   <refentryinfo>
     <title>sd_event_add_defer</title>
diff --git a/man/sd_event_add_signal.xml b/man/sd_event_add_signal.xml
index e84d5c7..1641480 100644
--- a/man/sd_event_add_signal.xml
+++ b/man/sd_event_add_signal.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_event_add_signal" conditional="ENABLE_KDBUS">
+<refentry id="sd_event_add_signal">
 
   <refentryinfo>
     <title>sd_event_add_signal</title>
diff --git a/man/sd_event_add_time.xml b/man/sd_event_add_time.xml
index 3c5de48..5fc9172 100644
--- a/man/sd_event_add_time.xml
+++ b/man/sd_event_add_time.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_event_add_time" conditional="ENABLE_KDBUS">
+<refentry id="sd_event_add_time">
 
   <refentryinfo>
     <title>sd_event_add_time</title>
diff --git a/man/sd_event_get_fd.xml b/man/sd_event_get_fd.xml
index 8f74c1e..1e46665 100644
--- a/man/sd_event_get_fd.xml
+++ b/man/sd_event_get_fd.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_event_get_fd" conditional="ENABLE_KDBUS"
+<refentry id="sd_event_get_fd"
         xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
diff --git a/man/sd_event_new.xml b/man/sd_event_new.xml
index d225330..43b5b74 100644
--- a/man/sd_event_new.xml
+++ b/man/sd_event_new.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_event_new" conditional="ENABLE_KDBUS">
+<refentry id="sd_event_new">
 
   <refentryinfo>
     <title>sd_event_new</title>
diff --git a/man/sd_event_run.xml b/man/sd_event_run.xml
index 036887d..9b50b95 100644
--- a/man/sd_event_run.xml
+++ b/man/sd_event_run.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_event_run" conditional="ENABLE_KDBUS">
+<refentry id="sd_event_run">
 
   <refentryinfo>
     <title>sd_event_run</title>
diff --git a/man/sd_event_set_name.xml b/man/sd_event_set_name.xml
index 0b46414..eec34d1 100644
--- a/man/sd_event_set_name.xml
+++ b/man/sd_event_set_name.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_event_set_name" conditional="ENABLE_KDBUS"
+<refentry id="sd_event_set_name"
         xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
diff --git a/man/sd_event_wait.xml b/man/sd_event_wait.xml
index db74a96..94f8b5c 100644
--- a/man/sd_event_wait.xml
+++ b/man/sd_event_wait.xml
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_event_wait" conditional="ENABLE_KDBUS">
+<refentry id="sd_event_wait">
 
   <refentryinfo>
     <title>sd_event_wait</title>

commit 11c9f1e48a683fb2e78ee531016099d567baa19a
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Wed Jun 17 11:23:46 2015 +0100

    Stop talking about the "XDG" version of basename()
    
    XDG refers to X Desktop Group, a former name for freedesktop.org.
    This group is responsible for specifications like basedirs,
    .desktop files and icon naming, but as far as I know, it has never
    tried to redefine basename().
    
    I think these references were meant to say XPG (X/Open Portability
    Guide), a precursor of POSIX. POSIX is better-known and less easily
    confused with XDG, and is how the basename(3) man page describes
    the libgen.h version of basename().
    
    The other version of basename() is glibc-specific and is described
    in basename(3) as "the GNU version"; specifically mention that
    version, to disambiguate.

diff --git a/CODING_STYLE b/CODING_STYLE
index bdec988..dbadfbd 100644
--- a/CODING_STYLE
+++ b/CODING_STYLE
@@ -210,11 +210,12 @@
   c) recvmsg() must get MSG_CMSG_CLOEXEC set
   d) F_DUPFD_CLOEXEC should be used instead of F_DUPFD, and so on
 
-- We never use the XDG version of basename(). glibc defines it in
-  libgen.h. The only reason to include that file is because dirname()
+- We never use the POSIX version of basename() (which glibc defines it in
+  libgen.h), only the GNU version (which glibc defines in string.h).
+  The only reason to include libgen.h is because dirname()
   is needed. Everytime you need that please immediately undefine
   basename(), and add a comment about it, so that no code ever ends up
-  using the XDG version!
+  using the POSIX version!
 
 - Use the bool type for booleans, not integers. One exception: in public
   headers (i.e those in src/systemd/sd-*.h) use integers after all, as "bool"
diff --git a/src/basic/util.c b/src/basic/util.c
index b7c70af..e0c5069 100644
--- a/src/basic/util.c
+++ b/src/basic/util.c
@@ -60,8 +60,8 @@
 #include <linux/fs.h>
 
 /* When we include libgen.h because we need dirname() we immediately
- * undefine basename() since libgen.h defines it as a macro to the XDG
- * version which is really broken. */
+ * undefine basename() since libgen.h defines it as a macro to the POSIX
+ * version which is really broken. We prefer GNU basename(). */
 #include <libgen.h>
 #undef basename
 
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c
index 3aaaabf..f08db2d 100644
--- a/src/libsystemd/sd-bus/bus-kernel.c
+++ b/src/libsystemd/sd-bus/bus-kernel.c
@@ -29,8 +29,8 @@
 #include <sys/prctl.h>
 
 /* When we include libgen.h because we need dirname() we immediately
- * undefine basename() since libgen.h defines it as a macro to the XDG
- * version which is really broken. */
+ * undefine basename() since libgen.h defines it as a macro to the POSIX
+ * version which is really broken. We prefer GNU basename(). */
 #include <libgen.h>
 #undef basename
 
diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
index 0892479..9f026be 100644
--- a/src/machine/machine-dbus.c
+++ b/src/machine/machine-dbus.c
@@ -24,8 +24,8 @@
 #include <sys/mount.h>
 
 /* When we include libgen.h because we need dirname() we immediately
- * undefine basename() since libgen.h defines it as a macro to the XDG
- * version which is really broken. */
+ * undefine basename() since libgen.h defines it as a macro to the POSIX
+ * version which is really broken. We prefer GNU basename(). */
 #include <libgen.h>
 #undef basename
 

commit 9d8a5fd3e62ee89073364a3f7fa95c50dc85d890
Merge: 6e2ebc8 cc65fe5
Author: David Herrmann <dh.herrmann at googlemail.com>
Date:   Wed Jun 17 12:20:03 2015 +0200

    Merge pull request #244 from poettering/sdbus-suppress-local
    
    sd-bus: suppress installing local bus matches server side


commit cc65fe5e14770d0116e0f475c5dc2ef57113bc98
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Jun 17 11:42:39 2015 +0200

    sd-bus: suppress installing local bus matches server side
    
    Matches that can only match against messages from the
    org.freedesktop.DBus.Local service (or the local interfaces or path)
    should never be installed server side, suppress them hence.
    
    Similar, on kdbus matches that can only match driver messages shouldn't
    be passed to the kernel.

diff --git a/src/libsystemd/sd-bus/bus-internal.h b/src/libsystemd/sd-bus/bus-internal.h
index 88c0588..c3e20ee 100644
--- a/src/libsystemd/sd-bus/bus-internal.h
+++ b/src/libsystemd/sd-bus/bus-internal.h
@@ -141,6 +141,7 @@ struct sd_bus_slot {
         void *userdata;
         BusSlotType type:5;
         bool floating:1;
+        bool match_added:1;
         char *description;
 
         LIST_FIELDS(sd_bus_slot, slots);
diff --git a/src/libsystemd/sd-bus/bus-match.c b/src/libsystemd/sd-bus/bus-match.c
index 7c5264f..132b375 100644
--- a/src/libsystemd/sd-bus/bus-match.c
+++ b/src/libsystemd/sd-bus/bus-match.c
@@ -1149,3 +1149,40 @@ void bus_match_dump(struct bus_match_node *node, unsigned level) {
         for (c = node->child; c; c = c->next)
                 bus_match_dump(c, level + 1);
 }
+
+enum bus_match_scope bus_match_get_scope(const struct bus_match_component *components, unsigned n_components) {
+        bool found_driver = false;
+        unsigned i;
+
+        if (n_components <= 0)
+                return BUS_MATCH_GENERIC;
+
+        assert(components);
+
+        /* Checks whether the specified match can only match the
+         * pseudo-service for local messages, which we detect by
+         * sender, interface or path. If a match is not restricted to
+         * local messages, then we check if it only matches on the
+         * driver. */
+
+        for (i = 0; i < n_components; i++) {
+                const struct bus_match_component *c = components + i;
+
+                if (c->type == BUS_MATCH_SENDER) {
+                        if (streq_ptr(c->value_str, "org.freedesktop.DBus.Local"))
+                                return BUS_MATCH_LOCAL;
+
+                        if (streq_ptr(c->value_str, "org.freedesktop.DBus"))
+                                found_driver = true;
+                }
+
+                if (c->type == BUS_MATCH_INTERFACE && streq_ptr(c->value_str, "org.freedesktop.DBus.Local"))
+                        return BUS_MATCH_LOCAL;
+
+                if (c->type == BUS_MATCH_PATH && streq_ptr(c->value_str, "/org/freedesktop/DBus/Local"))
+                        return BUS_MATCH_LOCAL;
+        }
+
+        return found_driver ? BUS_MATCH_DRIVER : BUS_MATCH_GENERIC;
+
+}
diff --git a/src/libsystemd/sd-bus/bus-match.h b/src/libsystemd/sd-bus/bus-match.h
index af5f65d..56516be 100644
--- a/src/libsystemd/sd-bus/bus-match.h
+++ b/src/libsystemd/sd-bus/bus-match.h
@@ -73,6 +73,12 @@ struct bus_match_component {
         char *value_str;
 };
 
+enum bus_match_scope {
+        BUS_MATCH_GENERIC,
+        BUS_MATCH_LOCAL,
+        BUS_MATCH_DRIVER,
+};
+
 int bus_match_run(sd_bus *bus, struct bus_match_node *root, sd_bus_message *m);
 
 int bus_match_add(struct bus_match_node *root, struct bus_match_component *components, unsigned n_components, struct match_callback *callback);
@@ -90,3 +96,5 @@ enum bus_match_node_type bus_match_node_type_from_string(const char *k, size_t n
 int bus_match_parse(const char *match, struct bus_match_component **_components, unsigned *_n_components);
 void bus_match_parse_free(struct bus_match_component *components, unsigned n_components);
 char *bus_match_to_string(struct bus_match_component *components, unsigned n_components);
+
+enum bus_match_scope bus_match_get_scope(const struct bus_match_component *components, unsigned n_components);
diff --git a/src/libsystemd/sd-bus/bus-slot.c b/src/libsystemd/sd-bus/bus-slot.c
index 8060e98..c452477 100644
--- a/src/libsystemd/sd-bus/bus-slot.c
+++ b/src/libsystemd/sd-bus/bus-slot.c
@@ -89,7 +89,7 @@ void bus_slot_disconnect(sd_bus_slot *slot) {
 
         case BUS_MATCH_CALLBACK:
 
-                if (slot->bus->bus_client)
+                if (slot->match_added)
                         bus_remove_match_internal(slot->bus, slot->match_callback.match_string, slot->match_callback.cookie);
 
                 slot->bus->match_callbacks_modified = true;
diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
index 2805b29..0881b47 100644
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/sd-bus/sd-bus.c
@@ -2952,22 +2952,35 @@ _public_ int sd_bus_add_match(
         s->match_callback.cookie = ++bus->match_cookie;
 
         if (bus->bus_client) {
+                enum bus_match_scope scope;
 
-                if (!bus->is_kernel) {
-                        /* When this is not a kernel transport, we
-                         * store the original match string, so that we
-                         * can use it to remove the match again */
+                scope = bus_match_get_scope(components, n_components);
 
-                        s->match_callback.match_string = strdup(match);
-                        if (!s->match_callback.match_string) {
-                                r = -ENOMEM;
-                                goto finish;
+                /* Do not install server-side matches for matches
+                 * against the local service, interface or bus
+                 * path. Also, when on kdbus don't install driver
+                 * matches server side. */
+                if (scope == BUS_MATCH_GENERIC ||
+                    (!bus->is_kernel && scope == BUS_MATCH_DRIVER)) {
+
+                        if (!bus->is_kernel) {
+                                /* When this is not a kernel transport, we
+                                 * store the original match string, so that we
+                                 * can use it to remove the match again */
+
+                                s->match_callback.match_string = strdup(match);
+                                if (!s->match_callback.match_string) {
+                                        r = -ENOMEM;
+                                        goto finish;
+                                }
                         }
-                }
 
-                r = bus_add_match_internal(bus, s->match_callback.match_string, components, n_components, s->match_callback.cookie);
-                if (r < 0)
-                        goto finish;
+                        r = bus_add_match_internal(bus, s->match_callback.match_string, components, n_components, s->match_callback.cookie);
+                        if (r < 0)
+                                goto finish;
+
+                        s->match_added = true;
+                }
         }
 
         bus->match_callbacks_modified = true;
diff --git a/src/libsystemd/sd-bus/test-bus-match.c b/src/libsystemd/sd-bus/test-bus-match.c
index 40c6704..a1687b1 100644
--- a/src/libsystemd/sd-bus/test-bus-match.c
+++ b/src/libsystemd/sd-bus/test-bus-match.c
@@ -77,6 +77,15 @@ static int match_add(sd_bus_slot *slots, struct bus_match_node *root, const char
         return r;
 }
 
+static void test_match_scope(const char *match, enum bus_match_scope scope) {
+        struct bus_match_component *components = NULL;
+        unsigned n_components = 0;
+
+        assert_se(bus_match_parse(match, &components, &n_components) >= 0);
+        assert_se(bus_match_get_scope(components, n_components) == scope);
+        bus_match_parse_free(components, n_components);
+}
+
 int main(int argc, char *argv[]) {
         struct bus_match_node root = {
                 .type = BUS_MATCH_ROOT,
@@ -142,5 +151,12 @@ int main(int argc, char *argv[]) {
 
         bus_match_free(&root);
 
+        test_match_scope("interface='foobar'", BUS_MATCH_GENERIC);
+        test_match_scope("", BUS_MATCH_GENERIC);
+        test_match_scope("interface='org.freedesktop.DBus.Local'", BUS_MATCH_LOCAL);
+        test_match_scope("sender='org.freedesktop.DBus.Local'", BUS_MATCH_LOCAL);
+        test_match_scope("member='gurke',path='/org/freedesktop/DBus/Local'", BUS_MATCH_LOCAL);
+        test_match_scope("arg2='piep',sender='org.freedesktop.DBus',member='waldo'", BUS_MATCH_DRIVER);
+
         return 0;
 }

commit 6e2ebc85ad5babb49e299d191f225742a7a0f63c
Merge: 59787a5 b6872d3
Author: Daniel Mack <github at zonque.org>
Date:   Wed Jun 17 10:56:21 2015 +0200

    Merge pull request #241 from jsynacek/doc-fix
    
    doc: improve readability in journald.conf.5


commit 59787a5c664ddfe0ed0f39e434078e593b29218b
Merge: a028d19 366e641
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Jun 17 10:37:43 2015 +0200

    Merge pull request #239 from dvdhrm/event-assert
    
    sd-event: make errors on EPOLL_CTL_DEL pseudo-fatal


commit b6872d3abec228baba18c814e87224741355a069
Author: Jan Synacek <jsynacek at redhat.com>
Date:   Wed Jun 17 10:12:09 2015 +0200

    doc: improve readability in journald.conf.5

diff --git a/man/journald.conf.xml b/man/journald.conf.xml
index 8d0dbb0..f8eb398 100644
--- a/man/journald.conf.xml
+++ b/man/journald.conf.xml
@@ -231,12 +231,13 @@
         eighth of the values configured with
         <varname>SystemMaxUse=</varname> and
         <varname>RuntimeMaxUse=</varname>, so that usually seven
-        rotated journal files are kept as history. Specify values in
-        bytes or use K, M, G, T, P, E as units for the specified sizes
-        (equal to 1024, 1024²,... bytes).  Note that size limits are
-        enforced synchronously when journal files are extended, and no
-        explicit rotation step triggered by time is
-        needed.</para></listitem>
+        rotated journal files are kept as history.</para></listitem>
+
+        <para>Specify values in bytes or use K, M, G, T, P, E as
+        units for the specified sizes (equal to 1024, 1024²,... bytes).
+        Note that size limits are enforced synchronously when journal
+        files are extended, and no explicit rotation step triggered by
+        time is needed.</para>
       </varlistentry>
 
       <varlistentry>

commit 366e641139130833a7354d9f2f96ce72633b1053
Author: David Herrmann <dh.herrmann at gmail.com>
Date:   Wed Jun 17 01:15:09 2015 +0200

    sd-event: make errors on EPOLL_CTL_DEL pseudo-fatal
    
    If we call EPOLL_CTL_DEL, we *REALLY* expect the file-descriptor to be
    present in that given epoll-set. We actually track such state via our
    s->io.registered flag, so it better be true.
    
    Make sure if that's not true, we treat it similar to assert_return() (ie.,
    print a loud warning).

diff --git a/src/basic/macro.h b/src/basic/macro.h
index cc1c9e7..5fa17ed 100644
--- a/src/basic/macro.h
+++ b/src/basic/macro.h
@@ -248,18 +248,19 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) {
         REENABLE_WARNING
 #endif
 
+#define assert_log(expr) ((_likely_(expr))      \
+        ? (true)                                \
+        : (log_assert_failed_return(#expr, __FILE__, __LINE__, __PRETTY_FUNCTION__), false))
+
 #define assert_return(expr, r)                                          \
         do {                                                            \
-                if (_unlikely_(!(expr))) {                              \
-                        log_assert_failed_return(#expr, __FILE__, __LINE__, __PRETTY_FUNCTION__); \
+                if (!assert_log(expr))                                  \
                         return (r);                                     \
-                }                                                       \
         } while (false)
 
 #define assert_return_errno(expr, r, err)                               \
         do {                                                            \
-                if (_unlikely_(!(expr))) {                              \
-                        log_assert_failed_return(#expr, __FILE__, __LINE__, __PRETTY_FUNCTION__); \
+                if (!assert_log(expr)) {                                \
                         errno = err;                                    \
                         return (r);                                     \
                 }                                                       \
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
index 00880c9..76964aa 100644
--- a/src/libsystemd/sd-event/sd-event.c
+++ b/src/libsystemd/sd-event/sd-event.c
@@ -468,24 +468,22 @@ static bool event_pid_changed(sd_event *e) {
         return e->original_pid != getpid();
 }
 
-static int source_io_unregister(sd_event_source *s) {
+static void source_io_unregister(sd_event_source *s) {
         int r;
 
         assert(s);
         assert(s->type == SOURCE_IO);
 
         if (event_pid_changed(s->event))
-                return 0;
+                return;
 
         if (!s->io.registered)
-                return 0;
+                return;
 
         r = epoll_ctl(s->event->epoll_fd, EPOLL_CTL_DEL, s->io.fd, NULL);
-        if (r < 0)
-                return -errno;
+        assert_log(r >= 0);
 
         s->io.registered = false;
-        return 0;
 }
 
 static int source_io_register(
@@ -1457,10 +1455,7 @@ _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) {
                 switch (s->type) {
 
                 case SOURCE_IO:
-                        r = source_io_unregister(s);
-                        if (r < 0)
-                                return r;
-
+                        source_io_unregister(s);
                         s->enabled = m;
                         break;
 

commit a028d19ba5d866c36d1c647a24cfba889cd28a9d
Merge: 2fbb6f8 aac7c5e
Author: Kay Sievers <kay at vrfy.org>
Date:   Wed Jun 17 07:55:26 2015 +0200

    Merge pull request #240 from kaysievers/wip
    
    build-sys: hide magic section variables from exported symbols


commit 2fbb6f8f7fdb47cf037a5c02cfe073cb690b1efb
Merge: 3eb3228 ab7854d
Author: Kay Sievers <kay at vrfy.org>
Date:   Wed Jun 17 07:32:25 2015 +0200

    Merge pull request #238 from dvdhrm/udev-epoll
    
    udev: don't close FDs before dropping them from epoll


commit aac7c5ed8bc6ffaba417b9c0b87bcf342865431b
Author: Kay Sievers <kay at vrfy.org>
Date:   Wed Jun 17 07:23:31 2015 +0200

    build-sys: hide magic section variables from exported symbols
    
    https://github.com/systemd/systemd/issues/234

diff --git a/Makefile.am b/Makefile.am
index 1dd6dbd..2a79a2a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3460,10 +3460,6 @@ libudev_la_SOURCES =\
 	src/libudev/libudev-queue.c \
 	src/libudev/libudev-hwdb.c
 
-libudev_la_CFLAGS = \
-	$(AM_CFLAGS) \
-	-fvisibility=hidden
-
 libudev_la_LDFLAGS = \
 	$(AM_LDFLAGS) \
 	-version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
@@ -3495,10 +3491,6 @@ noinst_LTLIBRARIES += \
 libudev_internal_la_SOURCES =\
 	$(libudev_la_SOURCES)
 
-libudev_internal_la_CFLAGS = \
-	$(AM_CFLAGS) \
-	-fvisibility=default
-
 # ------------------------------------------------------------------------------
 INSTALL_DIRS += \
 	$(sysconfdir)/udev/rules.d
@@ -5539,8 +5531,7 @@ pam_systemd_la_SOURCES = \
 
 pam_systemd_la_CFLAGS = \
 	$(AM_CFLAGS) \
-	$(PAM_CFLAGS) \
-	-fvisibility=hidden
+	$(PAM_CFLAGS)
 
 pam_systemd_la_LDFLAGS = \
 	$(AM_LDFLAGS) \
diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c
index dac157b..64a5a97 100644
--- a/src/libsystemd/sd-bus/bus-error.c
+++ b/src/libsystemd/sd-bus/bus-error.c
@@ -70,9 +70,11 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_standard_errors[] = {
         SD_BUS_ERROR_MAP_END
 };
 
-/* GCC maps this magically to the beginning and end of the BUS_ERROR_MAP section */
-extern const sd_bus_error_map __start_BUS_ERROR_MAP[];
-extern const sd_bus_error_map __stop_BUS_ERROR_MAP[];
+/* GCC maps this magically to the beginning and end of the BUS_ERROR_MAP section.
+ * Hide them; for currently unknown reasons they get exported to the shared libries
+ * even without being listed in the sym file. */
+extern const sd_bus_error_map __start_BUS_ERROR_MAP[] _hidden_;
+extern const sd_bus_error_map __stop_BUS_ERROR_MAP[] _hidden_;
 
 /* Additional maps registered with sd_bus_error_add_map() are in this
  * NULL terminated array */

commit ab7854df736585e42ec208012b7e2e11b652998a
Author: David Herrmann <dh.herrmann at gmail.com>
Date:   Tue Jun 16 23:36:36 2015 +0200

    udev: don't close FDs before dropping them from epoll
    
    Make sure we never close fds before we drop their related event-source.
    This will cause horrible disruptions if the fd-num is re-used by someone
    else. Under normal conditions, this should not cause any problems as the
    close() will drop the fd from the epoll-set automatically. However, this
    changes if you have any child processes with a copy of that fd.
    
    This fixes issue #163.
    
    Background:
            If you create an epoll-set via epoll_create() (lets call it 'EFD')
            you can add file-descriptors to it to watch for events. Whenever
            you call EPOLL_CTL_ADD on a file-descriptor you want to watch, the
            kernel looks up the attached "struct file" pointer, that this FD
            refers to. This combination of the FD-number and the "struct file"
            pointer is used as key to link it into the epoll-set (EFD).
    
            This means, if you duplicate your file-descriptor, you can watch
            this file-descriptor, too (because the duplicate will have a
            different FD-number, hence, the combination of FD-number and
            "struct file" is different as before).
    
            If you want to stop watching an FD, you use EPOLL_CTL_DEL and pass
            the FD to the kernel. The kernel again looks up your
            file-descriptor in your FD-table to find the linked "struct file".
            This FD-number and "struct file" combination is then dropped from
            the epoll-set (EFD).
    
            Last, but not least: If you close a file-descriptor that is linked
            to an epoll-set, the kernel does *NOTHING* regarding the
            epoll-set. This is a vital observation! Because this means, your
            epoll_wait() calls will still return the metadata you used to
            watch/subscribe your file-descriptor to events.
            There is one exception to this rule: If the file-descriptor that
            you just close()ed was the last FD that referred to the underlying
            "struct file", then _all_ epoll-set watches/subscriptions are
            destroyed. Hence, if you never dup()ed your FD, then a simple
            close() will also unsubscribe it from any epoll-set.
    
            With this in mind, lets look at fork():
                    Assume you have an epoll-set (EFD) and a bunch of FDs
                    subscribed to events on that EFD. If you now call fork(),
                    the new process gets a copy of your file-descriptor table.
                    This means, the whole table is copied and the "struct
                    file" reference of each FD is increased by 1. It is
                    important to notice that the FD-numbers in the child are
                    exactly the same as in the parent (eg., FD #5 in the child
                    refers to the same "struct file" as FD #5 in the parent).
    
                    This means, if the child calls EPOLL_CTL_DEL on an FD, the
                    kernel will look up the linked "struct file" and drop the
                    FD-number and "struct file" combination from the epoll-set
                    (EFD). However, this will effectively drop the
                    subscription that was installed by the parent.
    
                    To sum up: even though the child gets a duplicate of the
                    EFD and all FDs, the subscriptions in the EFD are *NOT*
                    duplicated!
    
    Now, with this in mind, lets look at what udevd does:
            Udevd has a bunch of file-descriptors that it watches in its
            sd-event main-loop. Whenever a uevent is received, the event is
            dispatched on its workers. If no suitable worker is present, a new
            worker is fork()ed to handle the event. Inside of this worker, we
            try to free all resources we inherited. However, the fork() call
            is done from a call-stack that is never rewinded. Therefore, this
            call stack might own references that it drops once it is left.
            Those references we cannot deduce from the fork()'ed process;
            effectively causing us to leak objects in the worker (eg., the
            call to sd_event_dispatch() that dispatched our uevent owns a
            reference to the sd_event object it used; and drops it again once
            the function is left).
    
            (Another example is udev_monitor_ref() for each 'worker' that is
             also inherited by all children; thus keeping the udev-monitor and
             the uevent-fd alive in all children (which is the real cause for
             bug #163))
    
            (The extreme variant is sd_event_source_unref(), which explicitly
             keeps event-sources alive, if they're currently dispatched,
             knowing that the dispatcher will free the event once done. But
             if the dispatcher is in the parent, the child will never ever
             free that object, thus leaking it)
    
            This is usually not an issue. However, if such an object has a
            file-descriptor embedded, this FD is left open and never closed in
            the child.
    
    In manager_exit(), if we now destroy an object (i.e., close its embedded
    file-descriptor) before we destroy its related sd_event_source, then
    sd-event will not be able to drop the FD from the epoll-set (EFD). This
    is, because the FD is no longer valid at the time we call EPOLL_CTL_DEL.
    Hence, the kernel cannot figure out the linked "struct file" and thus
    cannot remove the FD-number plus "struct file" combination; effectively
    leaving the subscription in the epoll-set.
    Since we leak the uevent-fd in the children, they retain a copy of the FD
    pointing to the same "struct file". Thus, the EFD-subscription are not
    automatically removed by close() (as described above). Therefore, the main
    daemon will still get its metadata back on epoll_watch() whenever an event
    occurs (even though it already freed the metadata). This then causes the
    free-after-use bug described in #163.
    
    This patch fixes the order in which we destruct objects and related
    sd-event-sources. Some open questions remain:
    
     * Why does source_io_unregister() not warn on EPOLL_CTL_DEL failures?
       This really needs to be turned into an assert_return().
    
     * udevd really should not leak file-descriptors into its children. Fixing
       this would *not* have prevented this bug, though (since the child-setup
       is still async).
       It's non-trivial to fix this, though. The stack-context of the caller
       cannot be rewinded, so we cannot figure out temporary refs. Maybe it's
       time to exec() the udev-workers?
    
     * Why does the kernel not copy FD-subscriptions across fork()?
       Or at least drop subscriptions if you close() your FD (it uses the
       FD-number as key, so it better subscribe to it)?
       Or it better used
             FD+"struct file_table*"+"struct file*"
       as key to not allow the childen to share the subscription table..
       *sigh*
       Seems like we have to live with that API forever.

diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index d3797bb..5ce1160 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -735,14 +735,14 @@ static void manager_exit(Manager *manager) {
                   "STATUS=Starting shutdown...");
 
         /* close sources of new events and discard buffered events */
-        manager->ctrl = udev_ctrl_unref(manager->ctrl);
         manager->ctrl_event = sd_event_source_unref(manager->ctrl_event);
+        manager->ctrl = udev_ctrl_unref(manager->ctrl);
 
-        manager->fd_inotify = safe_close(manager->fd_inotify);
         manager->inotify_event = sd_event_source_unref(manager->inotify_event);
+        manager->fd_inotify = safe_close(manager->fd_inotify);
 
-        manager->monitor = udev_monitor_unref(manager->monitor);
         manager->uevent_event = sd_event_source_unref(manager->uevent_event);
+        manager->monitor = udev_monitor_unref(manager->monitor);
 
         /* discard queued events and kill workers */
         event_queue_cleanup(manager, EVENT_QUEUED);

commit 2bf25eeff8f27ddcdba8b2a177f77e68d0bec6ed
Author: Filipe Brandenburger <filbranden at google.com>
Date:   Thu Jun 11 18:23:06 2015 -0700

    test-cgroup-mask: unit_get_sibling_mask ignores cgroup_supported
    
    The result of unit_get_sibling_mask returns bits for the sibling cgroups
    even if they are not supported in the local system.
    
    I caught this on a machine where my kernel was misconfigured with
    CONFIG_MEMCG unset, but the rest of the cgroup infrastructure enabled.
    
    Tested with `make check` on a host running a kernel where CONFIG_MEMCG
    is not set.

diff --git a/src/test/test-cgroup-mask.c b/src/test/test-cgroup-mask.c
index 289dddb..72f874d 100644
--- a/src/test/test-cgroup-mask.c
+++ b/src/test/test-cgroup-mask.c
@@ -77,12 +77,12 @@ static int test_cgroup_mask(void) {
         assert_se(unit_get_members_mask(root) == (CGROUP_CPU | CGROUP_CPUACCT | CGROUP_BLKIO | CGROUP_MEMORY));
 
         /* Verify aggregation of sibling masks. */
-        assert_se(unit_get_siblings_mask(son) == ((CGROUP_CPU | CGROUP_CPUACCT | CGROUP_MEMORY) & m->cgroup_supported));
-        assert_se(unit_get_siblings_mask(daughter) == ((CGROUP_CPU | CGROUP_CPUACCT | CGROUP_MEMORY) & m->cgroup_supported));
+        assert_se(unit_get_siblings_mask(son) == (CGROUP_CPU | CGROUP_CPUACCT | CGROUP_MEMORY));
+        assert_se(unit_get_siblings_mask(daughter) == (CGROUP_CPU | CGROUP_CPUACCT | CGROUP_MEMORY));
         assert_se(unit_get_siblings_mask(grandchild) == 0);
-        assert_se(unit_get_siblings_mask(parent_deep) == ((CGROUP_CPU | CGROUP_CPUACCT | CGROUP_MEMORY) & m->cgroup_supported));
-        assert_se(unit_get_siblings_mask(parent) == ((CGROUP_CPU | CGROUP_CPUACCT | CGROUP_BLKIO | CGROUP_MEMORY) & m->cgroup_supported));
-        assert_se(unit_get_siblings_mask(root) == ((CGROUP_CPU | CGROUP_CPUACCT | CGROUP_BLKIO | CGROUP_MEMORY) & m->cgroup_supported));
+        assert_se(unit_get_siblings_mask(parent_deep) == (CGROUP_CPU | CGROUP_CPUACCT | CGROUP_MEMORY));
+        assert_se(unit_get_siblings_mask(parent) == (CGROUP_CPU | CGROUP_CPUACCT | CGROUP_BLKIO | CGROUP_MEMORY));
+        assert_se(unit_get_siblings_mask(root) == (CGROUP_CPU | CGROUP_CPUACCT | CGROUP_BLKIO | CGROUP_MEMORY));
 
         /* Verify aggregation of target masks. */
         assert_se(unit_get_target_mask(son) == ((CGROUP_CPU | CGROUP_CPUACCT | CGROUP_MEMORY) & m->cgroup_supported));



More information about the systemd-commits mailing list