]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Merge pull request #248 from llua/zsh-completion
authorDaniel Mack <github@zonque.org>
Wed, 17 Jun 2015 19:37:46 +0000 (21:37 +0200)
committerDaniel Mack <github@zonque.org>
Wed, 17 Jun 2015 19:37:46 +0000 (21:37 +0200)
zsh-completion: _loginctl - general bug fixes

89 files changed:
CODING_STYLE
Makefile-man.am
Makefile.am
TODO
configure.ac
man/journald.conf.xml
man/libudev.xml [new file with mode: 0644]
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.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_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-bus-proxyd.xml
man/systemd-bus-proxyd@.service.xml
man/systemd-cgtop.xml
man/udev_device_get_syspath.xml [new file with mode: 0644]
man/udev_device_has_tag.xml [new file with mode: 0644]
man/udev_device_new_from_syspath.xml [new file with mode: 0644]
man/udev_enumerate_add_match_subsystem.xml [new file with mode: 0644]
man/udev_enumerate_new.xml [new file with mode: 0644]
man/udev_enumerate_scan_devices.xml [new file with mode: 0644]
man/udev_list_entry.xml [new file with mode: 0644]
man/udev_monitor_filter_update.xml [new file with mode: 0644]
man/udev_monitor_new_from_netlink.xml [new file with mode: 0644]
man/udev_monitor_receive_device.xml [new file with mode: 0644]
man/udev_new.xml [new file with mode: 0644]
src/basic/def.h
src/basic/macro.h
src/basic/util.c
src/basic/util.h
src/bus-proxyd/bus-proxyd.c
src/bus-proxyd/stdio-bridge.c
src/core/execute.c
src/core/kmod-setup.c
src/core/load-fragment-gperf.gperf.m4
src/core/load-fragment.c
src/core/manager.c
src/core/mount-setup.c
src/core/service.c
src/libsystemd-network/sd-dhcp-client.c
src/libsystemd/.gitignore
src/libsystemd/libsystemd.sym [moved from src/libsystemd/libsystemd.sym.m4 with 93% similarity]
src/libsystemd/sd-bus/bus-error.c
src/libsystemd/sd-bus/bus-internal.h
src/libsystemd/sd-bus/bus-kernel.c
src/libsystemd/sd-bus/bus-match.c
src/libsystemd/sd-bus/bus-match.h
src/libsystemd/sd-bus/bus-slot.c
src/libsystemd/sd-bus/sd-bus.c
src/libsystemd/sd-bus/test-bus-match.c
src/libsystemd/sd-event/sd-event.c
src/login/logind-button.c
src/login/logind-core.c
src/login/logind-dbus.c
src/login/logind-user.c
src/login/logind.h
src/login/pam_systemd.c
src/machine/machine-dbus.c
src/nspawn/nspawn.c
src/shared/bus-util.c
src/shared/logs-show.c
src/shared/watchdog.c
src/test/test-cgroup-mask.c
src/test/test-unit-file.c
src/test/test-util.c
src/tmpfiles/tmpfiles.c
src/udev/udevd.c
sysusers.d/systemd.conf.m4
units/systemd-networkd.service.m4.in
units/systemd-resolved.service.m4.in

index bdec988ce6bdbca0f9155bb57cb28577b2190a6c..dbadfbdb5441adf3ae53a0ebec458bf2726cd151 100644 (file)
   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"
index 85579e0c0a7992b86adb1cd000d7de9c016d752e..9e2f4ba2e395f7be128a8b48c84f51b367da79ab 100644 (file)
@@ -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)
 
@@ -765,7 +1052,6 @@ MANPAGES_ALIAS += \
 
 endif
 
-if ENABLE_KDBUS
 MANPAGES += \
        man/sd_bus_creds_get_pid.3 \
        man/sd_bus_creds_new_from_pid.3 \
@@ -1204,8 +1490,6 @@ man/sd_event_unref.html: man/sd_event_new.html
 man/systemd-bus-proxyd.socket.html: man/systemd-bus-proxyd@.service.html
        $(html-alias)
 
-endif
-
 if ENABLE_LOCALED
 MANPAGES += \
        man/localectl.1 \
@@ -1708,6 +1992,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 +2176,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
index 1dd6dbd5e5af31c5dca4a3cb299414700eedb0ca..7cc70445cc2ac9f0e099ed8e77175530024e106d 100644 (file)
@@ -338,10 +338,8 @@ INSTALL_EXEC_HOOKS += \
        install-aliases-hook \
        install-touch-usr-hook
 
-if ENABLE_KDBUS
 INSTALL_EXEC_HOOKS += \
        install-busnames-target-wants-hook
-endif
 
 # ------------------------------------------------------------------------------
 AM_V_M4 = $(AM_V_M4_$(V))
@@ -522,10 +520,8 @@ dist_systemunit_DATA = \
        units/initrd-switch-root.target \
        units/machines.target
 
-if ENABLE_KDBUS
 dist_systemunit_DATA += \
        $(dist_systemunit_DATA_busnames)
-endif
 
 dist_systemunit_DATA_busnames += \
        units/busnames.target
@@ -2622,7 +2618,6 @@ systemd_gpt_auto_generator_CFLAGS = \
 endif
 
 # ------------------------------------------------------------------------------
-if ENABLE_KDBUS
 systemgenerator_PROGRAMS +=  \
        systemd-dbus1-generator
 
@@ -2645,7 +2640,6 @@ dist_xinitrc_SCRIPTS = \
 
 INSTALL_EXEC_HOOKS += dbus1-generator-install-hook
 UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook
-endif
 
 # ------------------------------------------------------------------------------
 systemd_sysv_generator_SOURCES = \
@@ -2793,7 +2787,6 @@ systemd_stdio_bridge_LDADD = \
        libbus-proxy-core.la \
        libshared.la
 
-if ENABLE_KDBUS
 nodist_systemunit_DATA += \
        units/systemd-bus-proxyd.service
 
@@ -2805,7 +2798,6 @@ nodist_userunit_DATA += \
 
 dist_userunit_DATA += \
        units/user/systemd-bus-proxyd.socket
-endif
 
 EXTRA_DIST += \
        units/systemd-bus-proxyd.service.m4.in \
@@ -2841,6 +2833,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 +2910,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 +2918,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 +2936,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) \
@@ -2977,14 +2963,6 @@ pkginclude_HEADERS += \
        src/systemd/sd-id128.h \
        src/systemd/sd-daemon.h
 
-if ENABLE_KDBUS
-pkginclude_HEADERS += \
-       src/systemd/sd-utf8.h \
-       src/systemd/sd-netlink.h \
-       src/systemd/sd-resolve.h \
-       src/systemd/sd-path.h
-endif
-
 lib_LTLIBRARIES += \
        libsystemd.la
 
@@ -3460,10 +3438,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 +3469,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 +5509,7 @@ pam_systemd_la_SOURCES = \
 
 pam_systemd_la_CFLAGS = \
        $(AM_CFLAGS) \
-       $(PAM_CFLAGS) \
-       -fvisibility=hidden
+       $(PAM_CFLAGS)
 
 pam_systemd_la_LDFLAGS = \
        $(AM_LDFLAGS) \
@@ -5969,6 +5938,7 @@ substitutions = \
        '|systemgidmax=$(SYSTEM_GID_MAX)|' \
        '|TTY_GID=$(TTY_GID)|' \
        '|systemsleepdir=$(systemsleepdir)|' \
+       '|systemshutdowndir=$(systemshutdowndir)|' \
        '|binfmtdir=$(binfmtdir)|' \
        '|modulesloaddir=$(modulesloaddir)|'
 
@@ -6188,10 +6158,8 @@ USER_UNIT_ALIASES += \
        $(systemunitdir)/sound.target sound.target \
        $(systemunitdir)/smartcard.target smartcard.target
 
-if ENABLE_KDBUS
 USER_UNIT_ALIASES += \
        $(systemunitdir)/busnames.target busnames.target
-endif
 
 GENERAL_ALIASES += \
        $(systemunitdir)/remote-fs.target $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \
@@ -6252,7 +6220,6 @@ DISTCHECK_CONFIGURE_FLAGS = \
        --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
        --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
        --with-rootprefix=$$dc_install_base \
-       --enable-kdbus \
        --enable-compat-libs
 
 if HAVE_SYSV_COMPAT
@@ -6313,11 +6280,6 @@ hwdb-update:
                http://standards.ieee.org/develop/regauth/iab/iab.txt && \
        ./ids-update.pl )
 
-.PHONY: kdbus-update
-kdbus-update:
-       ( cd $(top_srcdir)/src/libsystemd/sd-bus/ && \
-       wget -N https://d-bus.googlecode.com/git/kdbus.h )
-
 .PHONY: git-tag
 git-tag:
        git tag -s "v$(VERSION)" -m "systemd $(VERSION)"
diff --git a/TODO b/TODO
index c25f3d3bb3ac3a9afab1c2c94949036884f3c02d..914261ffbc090a4b642efcfe34aa36bda00d3535 100644 (file)
--- 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
index b94dbd161327344fe0c7a3726e23457392b279d0..e5d3994439aa7e39e49062bb434d8ac4a2da6cb9 100644 (file)
@@ -1203,9 +1203,9 @@ AM_CONDITIONAL(ENABLE_TERMINAL, [test "x$have_terminal" = "xyes" -a "x$have_unif
 
 # ------------------------------------------------------------------------------
 have_kdbus=no
-AC_ARG_ENABLE(kdbus, AS_HELP_STRING([--enable-kdbus], [do connect to kdbus by default]))
-if test "x$enable_kdbus" = "xyes"; then
-        AC_DEFINE(ENABLE_KDBUS, 1, [Define if kdbus support is to be enabled])
+AC_ARG_ENABLE(kdbus, AS_HELP_STRING([--disable-kdbus], [do not connect to kdbus by default]))
+if test "x$enable_kdbus" != "xno"; then
+        AC_DEFINE(ENABLE_KDBUS, 1, [Define if kdbus is to be connected to by default])
         have_kdbus=yes
         M4_DEFINES="$M4_DEFINES -DENABLE_KDBUS"
 fi
index 8d0dbb013380780f0ef68bb908dde2ddf55f71e7..f8eb398abae4351d2417552e693e93c5fd6a9590 100644 (file)
         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>
diff --git a/man/libudev.xml b/man/libudev.xml
new file mode 100644 (file)
index 0000000..5660b9d
--- /dev/null
@@ -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@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@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 &lt;libudev.h&gt;</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>
index 8a193d5a59e8d43c977dba525caa34e8acfe1ae2..b9e081101b2a4be7ed7c31d80d017be6ba2b283d 100644 (file)
@@ -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>
index 695d4e1f5a52ce803ccafa4e0e423d46c5341ea6..36b6bef04e5a4d034702725201e2d28346e1576d 100644 (file)
@@ -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>
index 55f1b8bb6906b8b55a2335fe917b1e10c1769188..ae0b1a05c862ec53315e1f9c379871a832609c48 100644 (file)
@@ -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>
index bd2a27984c24d6ed6b32ebe43de78fb899a3b0ff..762f0c0d6da5320ed972853ad41b1728a62b76b8 100644 (file)
@@ -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>
index 91a80792e1ff3562657e1507d649c9d0d4fb90cd..5025bdfefbcdfdf13a25c9f97e40285992e5fa09 100644 (file)
@@ -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>
index 54098933746e09629c5a0a108788d0f326dbda47..fc5ee2392b273c09b489d6f3044db26c84ed17db 100644 (file)
@@ -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>
index 81ac6de95233d0d5faf7250c90097d4e1fd49529..82c6957122de51990fb5febbd5525b9b4fcecd1a 100644 (file)
@@ -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>
index 1fecbd577314e2074912b0de735e0aba5baa9c63..61c513ad75e2fd7f868734cb1de0488246275efb 100644 (file)
@@ -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>
index d986b06a41866b86067f82ddeb8b04a6412b2ce5..57a6864acefccc066fabd6672af96dcee97fa54e 100644 (file)
@@ -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>
index 7795acfec33dffa44e56e5e07a220e94fb16af18..7f762a34f7ee1fabbc76eec05eb2759e8ec26435 100644 (file)
@@ -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>
index c109fe10a3fb10f3fa44b67ffec8f8dd6c54550d..c8deecffbbb35dee5baab4de2d1318f97ed062b7 100644 (file)
@@ -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>
index 4f9204e7bceee592a9bbb4e2d94144e9aaa9831f..d31cb57e5f447bd4689b78e08738e02d9b3e0ff8 100644 (file)
@@ -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>
index bc91dd2665f3ec1bce11080786dd0144ac1046ba..c1d82bbe5347bb219fc6c1abc2b5624d394f901b 100644 (file)
@@ -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>
index 0a6ac8047329b6b118dc7201e5746accdaef71b9..41c35bde02262955bd0d366ff18c9faf4c7c094c 100644 (file)
@@ -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>
index 78b440b7db5246963ff0072484d817a6d4b1519b..a7dc9fea89cb7dde1ed3fa814aee0db7cc40d8bb 100644 (file)
@@ -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>
index 7de9f409e9e220046f8d008529b375f7c64d35e9..6b53c8422bfb3f2d3fbd4070942f73f187559596 100644 (file)
@@ -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>
index 4aabc0793a0cb07014959367e83c953d6502ada4..b991b38650f048d0b1a7f29e1a1b65302de70ead 100644 (file)
@@ -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>
index e84d5c7200609bcbbbc05948aa457d6e26d67003..16414803f4160e117a3465d81a995a0d23ba9db7 100644 (file)
@@ -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>
index 3c5de48cabe7fcd5a136c613510784aff61400a0..5fc917270c29bb08c3d52837924f12de6bf9ccc2 100644 (file)
@@ -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>
index 8f74c1e5c4fa22e2c3fc2448c47c350059fa7b03..1e46665e47048b6d234ac81013865fef623c145a 100644 (file)
@@ -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>
index d2253300230104860fe1ef682baeddfd383bda69..43b5b742f73b9b4fc805cc2f20a56d7a0445924b 100644 (file)
@@ -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>
index 036887d9f0ecae25f8e288d5ed50ee6ea879b918..9b50b95459cb1198cec31cd780948a645852d4fb 100644 (file)
@@ -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>
index 0b46414bba55facaedbe6ecd762deb01d07cb537..eec34d1182f433d1e78ea4ee9342205484a78ed7 100644 (file)
@@ -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>
index db74a96e8ec58d09ed73c0caca022e49a70f6b33..94f8b5ca457edd9e01388df5a9f5dddc43dabd8a 100644 (file)
@@ -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>
index bbcf3d0981edf7f2459106401b31b88ee3ebcea5..f7b94cd481612694d2951f5ad7b775dcf9d29f0f 100644 (file)
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="systemd-bus-proxyd" conditional="ENABLE_KDBUS"
+<refentry id="systemd-bus-proxyd"
           xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
index 9dabc4dd5f6f3490de1f3a9c872f91abbe78c3ea..4ac6ba040c6a7b62b974e4cf0a88266d1b15ce83 100644 (file)
@@ -24,7 +24,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="systemd-bus-proxyd@.service" conditional='ENABLE_KDBUS'>
+<refentry id="systemd-bus-proxyd@.service">
 
   <refentryinfo>
     <title>systemd-bus-proxyd@.service</title>
index d14564480daa1bd06cc96934749635e6fa831771..969edd055e361c2e3e80cf30627ee667aa6af3e3 100644 (file)
     <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
diff --git a/man/udev_device_get_syspath.xml b/man/udev_device_get_syspath.xml
new file mode 100644 (file)
index 0000000..b3062ae
--- /dev/null
@@ -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@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@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 &lt;libudev.h&gt;</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 (file)
index 0000000..4802573
--- /dev/null
@@ -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@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@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 &lt;libudev.h&gt;</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 (file)
index 0000000..c3c0d76
--- /dev/null
@@ -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@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@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 &lt;libudev.h&gt;</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 (file)
index 0000000..5acce00
--- /dev/null
@@ -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@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@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 &lt;libudev.h&gt;</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 (file)
index 0000000..b5856c5
--- /dev/null
@@ -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@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@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 &lt;libudev.h&gt;</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 (file)
index 0000000..73566f5
--- /dev/null
@@ -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@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@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 &lt;libudev.h&gt;</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 (file)
index 0000000..6e033bd
--- /dev/null
@@ -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@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@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 &lt;libudev.h&gt;</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 (file)
index 0000000..f129595
--- /dev/null
@@ -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@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@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 &lt;libudev.h&gt;</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 (file)
index 0000000..d73a4ac
--- /dev/null
@@ -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@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@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 &lt;libudev.h&gt;</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 (file)
index 0000000..7e842f8
--- /dev/null
@@ -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@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@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 &lt;libudev.h&gt;</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 (file)
index 0000000..587835a
--- /dev/null
@@ -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@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@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 &lt;libudev.h&gt;</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>
index 011c7c667e2feeddc8273f4cd80f30941dadb04c..5aaba1fe87264d06b2ca6448eafae0e167a9f07b 100644 (file)
 
 #define UNIX_SYSTEM_BUS_ADDRESS "unix:path=/var/run/dbus/system_bus_socket"
 #define KERNEL_SYSTEM_BUS_ADDRESS "kernel:path=/sys/fs/kdbus/0-system/bus"
-
-#ifdef ENABLE_KDBUS
-#  define DEFAULT_SYSTEM_BUS_ADDRESS KERNEL_SYSTEM_BUS_ADDRESS ";" UNIX_SYSTEM_BUS_ADDRESS
-#else
-#  define DEFAULT_SYSTEM_BUS_ADDRESS UNIX_SYSTEM_BUS_ADDRESS
-#endif
-
+#define DEFAULT_SYSTEM_BUS_ADDRESS KERNEL_SYSTEM_BUS_ADDRESS ";" UNIX_SYSTEM_BUS_ADDRESS
 #define UNIX_USER_BUS_ADDRESS_FMT "unix:path=%s/bus"
 #define KERNEL_USER_BUS_ADDRESS_FMT "kernel:path=/sys/fs/kdbus/"UID_FMT"-user/bus"
 
index cc1c9e73c08bddcbe39ebee5ac221a14b6d547f1..5fa17ed2085cdc2fe3a7b992468f5917d6cd96b0 100644 (file)
@@ -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);                                     \
                 }                                                       \
index b7c70af5414001ae2f8cb6e6d429b4946b055e69..727be56f58302a90d1d3395262ea754efa4bb256 100644 (file)
@@ -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
 
@@ -5209,35 +5209,6 @@ int unquote_first_word(const char **p, char **ret, UnquoteFlags flags) {
 
                         break;
 
-                case VALUE_ESCAPE:
-                        if (c == 0) {
-                                if (flags & UNQUOTE_RELAX)
-                                        goto finish;
-                                return -EINVAL;
-                        }
-
-                        if (!GREEDY_REALLOC(s, allocated, sz+7))
-                                return -ENOMEM;
-
-                        if (flags & UNQUOTE_CUNESCAPE) {
-                                uint32_t u;
-
-                                r = cunescape_one(*p, (size_t) -1, &c, &u);
-                                if (r < 0)
-                                        return -EINVAL;
-
-                                (*p) += r - 1;
-
-                                if (c != 0)
-                                        s[sz++] = c; /* normal explicit char */
-                                else
-                                        sz += utf8_encode_unichar(s + sz, u); /* unicode chars we'll encode as utf8 */
-                        } else
-                                s[sz++] = c;
-
-                        state = VALUE;
-                        break;
-
                 case SINGLE_QUOTE:
                         if (c == 0) {
                                 if (flags & UNQUOTE_RELAX)
@@ -5256,35 +5227,6 @@ int unquote_first_word(const char **p, char **ret, UnquoteFlags flags) {
 
                         break;
 
-                case SINGLE_QUOTE_ESCAPE:
-                        if (c == 0) {
-                                if (flags & UNQUOTE_RELAX)
-                                        goto finish;
-                                return -EINVAL;
-                        }
-
-                        if (!GREEDY_REALLOC(s, allocated, sz+7))
-                                return -ENOMEM;
-
-                        if (flags & UNQUOTE_CUNESCAPE) {
-                                uint32_t u;
-
-                                r = cunescape_one(*p, (size_t) -1, &c, &u);
-                                if (r < 0)
-                                        return -EINVAL;
-
-                                (*p) += r - 1;
-
-                                if (c != 0)
-                                        s[sz++] = c;
-                                else
-                                        sz += utf8_encode_unichar(s + sz, u);
-                        } else
-                                s[sz++] = c;
-
-                        state = SINGLE_QUOTE;
-                        break;
-
                 case DOUBLE_QUOTE:
                         if (c == 0)
                                 return -EINVAL;
@@ -5301,33 +5243,56 @@ int unquote_first_word(const char **p, char **ret, UnquoteFlags flags) {
 
                         break;
 
+                case SINGLE_QUOTE_ESCAPE:
                 case DOUBLE_QUOTE_ESCAPE:
+                case VALUE_ESCAPE:
+                        if (!GREEDY_REALLOC(s, allocated, sz+7))
+                                return -ENOMEM;
+
                         if (c == 0) {
+                                if ((flags & UNQUOTE_CUNESCAPE_RELAX) &&
+                                    (state == VALUE_ESCAPE || flags & UNQUOTE_RELAX)) {
+                                        /* If we find an unquoted trailing backslash and we're in
+                                         * UNQUOTE_CUNESCAPE_RELAX mode, keep it verbatim in the
+                                         * output.
+                                         *
+                                         * Unbalanced quotes will only be allowed in UNQUOTE_RELAX
+                                         * mode, UNQUOTE_CUNESCAP_RELAX mode does not allow them.
+                                         */
+                                        s[sz++] = '\\';
+                                        goto finish;
+                                }
                                 if (flags & UNQUOTE_RELAX)
                                         goto finish;
                                 return -EINVAL;
                         }
 
-                        if (!GREEDY_REALLOC(s, allocated, sz+7))
-                                return -ENOMEM;
-
                         if (flags & UNQUOTE_CUNESCAPE) {
                                 uint32_t u;
 
                                 r = cunescape_one(*p, (size_t) -1, &c, &u);
-                                if (r < 0)
+                                if (r < 0) {
+                                        if (flags & UNQUOTE_CUNESCAPE_RELAX) {
+                                                s[sz++] = '\\';
+                                                s[sz++] = c;
+                                                goto end_escape;
+                                        }
                                         return -EINVAL;
+                                }
 
                                 (*p) += r - 1;
 
                                 if (c != 0)
-                                        s[sz++] = c;
+                                        s[sz++] = c; /* normal explicit char */
                                 else
-                                        sz += utf8_encode_unichar(s + sz, u);
+                                        sz += utf8_encode_unichar(s + sz, u); /* unicode chars we'll encode as utf8 */
                         } else
                                 s[sz++] = c;
 
-                        state = DOUBLE_QUOTE;
+end_escape:
+                        state = (state == SINGLE_QUOTE_ESCAPE) ? SINGLE_QUOTE :
+                                (state == DOUBLE_QUOTE_ESCAPE) ? DOUBLE_QUOTE :
+                                VALUE;
                         break;
 
                 case SPACE:
@@ -5355,6 +5320,36 @@ finish:
         return 1;
 }
 
+int unquote_first_word_and_warn(
+                const char **p,
+                char **ret,
+                UnquoteFlags flags,
+                const char *unit,
+                const char *filename,
+                unsigned line,
+                const char *rvalue) {
+        /* Try to unquote it, if it fails, warn about it and try again but this
+         * time using UNQUOTE_CUNESCAPE_RELAX to keep the backslashes verbatim
+         * in invalid escape sequences. */
+        const char *save;
+        int r;
+
+        save = *p;
+        r = unquote_first_word(p, ret, flags);
+        if (r < 0 && !(flags&UNQUOTE_CUNESCAPE_RELAX)) {
+                /* Retry it with UNQUOTE_CUNESCAPE_RELAX. */
+                *p = save;
+                r = unquote_first_word(p, ret, flags|UNQUOTE_CUNESCAPE_RELAX);
+                if (r < 0)
+                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                                   "Unbalanced quoting in command line, ignoring: \"%s\"", rvalue);
+                else
+                        log_syntax(unit, LOG_WARNING, filename, line, EINVAL,
+                                   "Invalid escape sequences in command line: \"%s\"", rvalue);
+        }
+        return r;
+}
+
 int unquote_many_words(const char **p, UnquoteFlags flags, ...) {
         va_list ap;
         char **l;
index 7aca46d777884a3bb9afdac779ec64d750916eef..a1d1dd15c3948b3682da88632c63271ce70bbb92 100644 (file)
@@ -839,11 +839,13 @@ int is_dir(const char *path, bool follow);
 int is_device_node(const char *path);
 
 typedef enum UnquoteFlags {
-        UNQUOTE_RELAX     = 1,
-        UNQUOTE_CUNESCAPE = 2,
+        UNQUOTE_RELAX           = 1,
+        UNQUOTE_CUNESCAPE       = 2,
+        UNQUOTE_CUNESCAPE_RELAX = 4,
 } UnquoteFlags;
 
 int unquote_first_word(const char **p, char **ret, UnquoteFlags flags);
+int unquote_first_word_and_warn(const char **p, char **ret, UnquoteFlags flags, const char *unit, const char *filename, unsigned line, const char *rvalue);
 int unquote_many_words(const char **p, UnquoteFlags flags, ...) _sentinel_;
 
 int free_and_strdup(char **p, const char *s);
index 3e398b53e9c803251a9ed27e84a6ee156b39474e..3cc3b33ae70a7322c71afc478bd15fed940c61c3 100644 (file)
@@ -239,11 +239,7 @@ static int parse_argv(int argc, char *argv[]) {
                         if (!e)
                                 return log_oom();
 
-#ifdef ENABLE_KDBUS
                         a = strjoin("x-machine-kernel:machine=", e, ";x-machine-unix:machine=", e, NULL);
-#else
-                        a = strjoin("x-machine-unix:machine=", e, NULL);
-#endif
                         if (!a)
                                 return log_oom();
 
index 61bc08ae33d7744ad3fb26186158ea96d2bf0b89..f275f6705fb6bc5c0eff6045f532a7cd8548da62 100644 (file)
@@ -110,11 +110,7 @@ static int parse_argv(int argc, char *argv[]) {
                         if (!e)
                                 return log_oom();
 
-#ifdef ENABLE_KDBUS
                         a = strjoin("x-machine-kernel:machine=", e, ";x-machine-unix:machine=", e, NULL);
-#else
-                        a = strjoin("x-machine-unix:machine=", e, NULL);
-#endif
                         if (!a)
                                 return log_oom();
 
index 444865da8665f42dc6e15a2c8faf5b08366ed5ed..94cc10173825df7a56101030b162cd9248be438e 100644 (file)
@@ -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)
@@ -1509,7 +1514,6 @@ static int exec_child(
                 }
         }
 
-#ifdef ENABLE_KDBUS
         if (params->bus_endpoint_fd >= 0 && context->bus_endpoint) {
                 uid_t ep_uid = (uid == UID_INVALID) ? 0 : uid;
 
@@ -1519,7 +1523,6 @@ static int exec_child(
                         return r;
                 }
         }
-#endif
 
         /* If delegation is enabled we'll pass ownership of the cgroup
          * (but only in systemd's own controller hierarchy!) to the
index f5584b6b14fda98f7c18c5d668b3939ad0477516..e7a6bdc8c4ff6489cdf4ebb1a15672628f35a9cd 100644 (file)
@@ -66,10 +66,8 @@ int kmod_setup(void) {
                 /* this should never be a module */
                 { "unix",      "/proc/net/unix",            true,   true,    NULL      },
 
-#ifdef ENABLE_KDBUS
                 /* IPC is needed before we bring up any other services */
                 { "kdbus",     "/sys/fs/kdbus",             false,  false,   is_kdbus_wanted },
-#endif
 
 #ifdef HAVE_LIBIPTC
                 /* netfilter is needed by networkd, nspawn among others, and cannot be autoloaded */
index 66c9145aa6ab809fd6a79cfcdffd05fdeb1003a1..aae81c80cbc50d55281fff5235fb7d140dfbdcd2 100644 (file)
@@ -229,9 +229,7 @@ Service.BusName,                 config_parse_bus_name,              0,
 Service.FileDescriptorStoreMax,  config_parse_unsigned,              0,                             offsetof(Service, n_fd_store_max)
 Service.NotifyAccess,            config_parse_notify_access,         0,                             offsetof(Service, notify_access)
 Service.Sockets,                 config_parse_service_sockets,       0,                             0
-m4_ifdef(`ENABLE_KDBUS',
-`Service.BusPolicy,              config_parse_bus_endpoint_policy,   0,                             offsetof(Service, exec_context)',
-`Service.BusPolicy,              config_parse_warn_compat,           DISABLED_EXPERIMENTAL,         0')
+Service.BusPolicy,               config_parse_bus_endpoint_policy,   0,                             offsetof(Service, exec_context)
 EXEC_CONTEXT_CONFIG_ITEMS(Service)m4_dnl
 CGROUP_CONTEXT_CONFIG_ITEMS(Service)m4_dnl
 KILL_CONTEXT_CONFIG_ITEMS(Service)m4_dnl
index df5fe6fb326367082add9dda2c7beee7ee2e9442..a48cb4029a922d9110acb05e7cc2fce43a46c404 100644 (file)
@@ -520,9 +520,9 @@ int config_parse_exec(
                 void *data,
                 void *userdata) {
 
-        ExecCommand **e = data, *nce;
-        char *path, **n;
-        unsigned k;
+        ExecCommand **e = data;
+        const char *p;
+        bool semicolon;
         int r;
 
         assert(filename);
@@ -532,156 +532,154 @@ int config_parse_exec(
 
         e += ltype;
 
+        rvalue += strspn(rvalue, WHITESPACE);
+        p = rvalue;
+
         if (isempty(rvalue)) {
                 /* An empty assignment resets the list */
                 *e = exec_command_free_list(*e);
                 return 0;
         }
 
-        /* We accept an absolute path as first argument, or
-         * alternatively an absolute prefixed with @ to allow
-         * overriding of argv[0]. */
-        for (;;) {
+        do {
                 int i;
-                const char *word, *state, *reason;
-                size_t l;
+                _cleanup_strv_free_ char **n = NULL;
+                size_t nlen = 0, nbufsize = 0;
+                _cleanup_free_ ExecCommand *nce = NULL;
+                _cleanup_free_ char *path = NULL, *firstword = NULL;
+                char *f;
                 bool separate_argv0 = false, ignore = false;
 
-                path = NULL;
-                nce = NULL;
-                n = NULL;
+                semicolon = false;
 
-                rvalue += strspn(rvalue, WHITESPACE);
+                r = unquote_first_word_and_warn(&p, &firstword, UNQUOTE_CUNESCAPE, unit, filename, line, rvalue);
+                if (r <= 0)
+                        return 0;
 
-                if (rvalue[0] == 0)
-                        break;
+                f = firstword;
+                for (i = 0; i < 2; i++) {
+                        /* We accept an absolute path as first argument, or
+                         * alternatively an absolute prefixed with @ to allow
+                         * overriding of argv[0]. */
+                        if (*f == '-' && !ignore)
+                                ignore = true;
+                        else if (*f == '@' && !separate_argv0)
+                                separate_argv0 = true;
+                        else
+                                break;
+                        f ++;
+                }
 
-                k = 0;
-                FOREACH_WORD_QUOTED(word, l, rvalue, state) {
-                        if (k == 0) {
-                                for (i = 0; i < 2; i++) {
-                                        if (*word == '-' && !ignore) {
-                                                ignore = true;
-                                                word ++;
-                                        }
-
-                                        if (*word == '@' && !separate_argv0) {
-                                                separate_argv0 = true;
-                                                word ++;
-                                        }
-                                }
-                        } else if (strneq(word, ";", MAX(l, 1U)))
-                                goto found;
+                if (isempty(f)) {
+                        /* First word is either "-" or "@" with no command. */
+                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                                   "Empty path in command line, ignoring: \"%s\"", rvalue);
+                        return 0;
+                }
 
-                        k++;
+                if (!string_is_safe(f)) {
+                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                                        "Executable path contains special characters, ignoring: %s", rvalue);
+                        return 0;
                 }
-                if (!isempty(state)) {
-                        log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Trailing garbage, ignoring.");
+                if (!path_is_absolute(f)) {
+                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                                        "Executable path is not absolute, ignoring: %s", rvalue);
+                        return 0;
+                }
+                if (endswith(f, "/")) {
+                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                                        "Executable path specifies a directory, ignoring: %s", rvalue);
                         return 0;
                 }
 
-        found:
-                /* If separate_argv0, we'll move first element to path variable */
-                n = new(char*, MAX(k + !separate_argv0, 1u));
-                if (!n)
-                        return log_oom();
+                if (f == firstword) {
+                        path = firstword;
+                        firstword = NULL;
+                } else {
+                        path = strdup(f);
+                        if (!path)
+                                return log_oom();
+                }
 
-                k = 0;
-                FOREACH_WORD_QUOTED(word, l, rvalue, state) {
-                        char *c;
-                        unsigned skip;
-
-                        if (separate_argv0 ? path == NULL : k == 0) {
-                                /* first word, very special */
-                                skip = separate_argv0 + ignore;
-
-                                /* skip special chars in the beginning */
-                                if (l <= skip) {
-                                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
-                                                   "Empty path in command line, ignoring: \"%s\"", rvalue);
-                                        r = 0;
-                                        goto fail;
-                                }
+                if (!separate_argv0) {
+                        if (!GREEDY_REALLOC(n, nbufsize, nlen + 2))
+                                return log_oom();
+                        f = strdup(path);
+                        if (!f)
+                                return log_oom();
+                        n[nlen++] = f;
+                        n[nlen] = NULL;
+                }
 
-                        } else if (strneq(word, ";", MAX(l, 1U)))
-                                /* new commandline */
-                                break;
+                path_kill_slashes(path);
 
-                        else
-                                skip = strneq(word, "\\;", MAX(l, 1U));
+                for (;;) {
+                        _cleanup_free_ char *word = NULL;
 
-                        r = cunescape_length(word + skip, l - skip, UNESCAPE_RELAX, &c);
-                        if (r < 0) {
-                                log_syntax(unit, LOG_ERR, filename, line, r, "Failed to unescape command line, ignoring: %s", rvalue);
-                                r = 0;
-                                goto fail;
+                        /* Check explicitly for an unquoted semicolon as
+                         * command separator token.  */
+                        if (p[0] == ';' && (!p[1] || strchr(WHITESPACE, p[1]))) {
+                                p ++;
+                                p += strspn(p, WHITESPACE);
+                                semicolon = true;
+                                break;
                         }
 
-                        if (!utf8_is_valid(c)) {
-                                log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue);
-                                r = 0;
-                                goto fail;
+                        /* Check for \; explicitly, to not confuse it with \\;
+                         * or "\;" or "\\;" etc.  unquote_first_word would
+                         * return the same for all of those.  */
+                        if (p[0] == '\\' && p[1] == ';' && (!p[2] || strchr(WHITESPACE, p[2]))) {
+                                p += 2;
+                                p += strspn(p, WHITESPACE);
+                                if (!GREEDY_REALLOC(n, nbufsize, nlen + 2))
+                                        return log_oom();
+                                f = strdup(";");
+                                if (!f)
+                                        return log_oom();
+                                n[nlen++] = f;
+                                n[nlen] = NULL;
+                                continue;
                         }
 
-                        /* where to stuff this? */
-                        if (separate_argv0 && path == NULL)
-                                path = c;
-                        else
-                                n[k++] = c;
-                }
+                        r = unquote_first_word_and_warn(&p, &word, UNQUOTE_CUNESCAPE, unit, filename, line, rvalue);
+                        if (r == 0)
+                                break;
+                        else if (r < 0)
+                                return 0;
 
-                n[k] = NULL;
+                        if (!GREEDY_REALLOC(n, nbufsize, nlen + 2))
+                                return log_oom();
+                        n[nlen++] = word;
+                        n[nlen] = NULL;
+                        word = NULL;
+                }
 
-                if (!n[0])
-                        reason = "Empty executable name or zeroeth argument";
-                else if (!string_is_safe(path ?: n[0]))
-                        reason = "Executable path contains special characters";
-                else if (!path_is_absolute(path ?: n[0]))
-                        reason = "Executable path is not absolute";
-                else if (endswith(path ?: n[0], "/"))
-                        reason = "Executable path specifies a directory";
-                else
-                        goto ok;
-
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "%s, ignoring: %s", reason, rvalue);
-                r = 0;
-                goto fail;
-
-ok:
-                if (!path) {
-                        path = strdup(n[0]);
-                        if (!path) {
-                                r = log_oom();
-                                goto fail;
-                        }
+                if (!n || !n[0]) {
+                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                                        "Empty executable name or zeroeth argument, ignoring: %s", rvalue);
+                        return 0;
                 }
 
                 nce = new0(ExecCommand, 1);
-                if (!nce) {
-                        r = log_oom();
-                        goto fail;
-                }
+                if (!nce)
+                        return log_oom();
 
                 nce->argv = n;
                 nce->path = path;
                 nce->ignore = ignore;
 
-                path_kill_slashes(nce->path);
-
                 exec_command_append_list(e, nce);
 
-                rvalue = state;
-        }
-
-        return 0;
+                /* Do not _cleanup_free_ these. */
+                n = NULL;
+                path = NULL;
+                nce = NULL;
 
-fail:
-        n[k] = NULL;
-        strv_free(n);
-        free(path);
-        free(nce);
+                rvalue = p;
+        } while (semicolon);
 
-        return r;
+        return 0;
 }
 
 DEFINE_CONFIG_PARSE_ENUM(config_parse_service_type, service_type, ServiceType, "Failed to parse service type");
index eb80dd1b46b001b7b107b094a957b805382388bf..a1f37bbbb3058d9e03ad77d5c71c3a11688a412b 100644 (file)
@@ -731,7 +731,6 @@ static int manager_setup_notify(Manager *m) {
 }
 
 static int manager_setup_kdbus(Manager *m) {
-#ifdef ENABLE_KDBUS
         _cleanup_free_ char *p = NULL;
 
         assert(m);
@@ -749,7 +748,6 @@ static int manager_setup_kdbus(Manager *m) {
                 return log_debug_errno(m->kdbus_fd, "Failed to set up kdbus: %m");
 
         log_debug("Successfully set up kdbus on %s", p);
-#endif
 
         return 0;
 }
index c35248eeaed63c9c97dd18e3539add6f62d408ce..42a6b952b967a6b2afb7fa0f4055d96b582dd930 100644 (file)
@@ -104,10 +104,8 @@ static const MountPoint mount_table[] = {
         { "efivarfs",    "/sys/firmware/efi/efivars", "efivarfs",   NULL,                      MS_NOSUID|MS_NOEXEC|MS_NODEV,
           is_efi_boot,   MNT_NONE                   },
 #endif
-#ifdef ENABLE_KDBUS
         { "kdbusfs",    "/sys/fs/kdbus",             "kdbusfs",    NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV,
           NULL,       MNT_IN_CONTAINER },
-#endif
 };
 
 /* These are API file systems that might be mounted by other software,
index 71252e29e2e59c163b2733dcc288204f7d1fb945..fa1e80b7104749dbc295febb1d99a15237079cf2 100644 (file)
@@ -568,14 +568,12 @@ static int service_add_extras(Service *s) {
                 s->notify_access = NOTIFY_MAIN;
 
         if (s->bus_name) {
-#ifdef ENABLE_KDBUS
                 const char *n;
 
                 n = strjoina(s->bus_name, ".busname");
                 r = unit_add_dependency_by_name(UNIT(s), UNIT_AFTER, n, NULL, true);
                 if (r < 0)
                         return r;
-#endif
 
                 r = unit_watch_bus_name(UNIT(s), s->bus_name);
                 if (r < 0)
@@ -1180,7 +1178,6 @@ static int service_spawn(
         } else
                 path = UNIT(s)->cgroup_path;
 
-#ifdef ENABLE_KDBUS
         if (s->exec_context.bus_endpoint) {
                 r = bus_kernel_create_endpoint(UNIT(s)->manager->running_as == MANAGER_SYSTEM ? "system" : "user",
                                                UNIT(s)->id, &bus_endpoint_path);
@@ -1192,7 +1189,6 @@ static int service_spawn(
                  * as the service is running. */
                 exec_params.bus_endpoint_fd = s->bus_endpoint_fd = r;
         }
-#endif
 
         exec_params.argv = argv;
         exec_params.fds = fds;
index 6853038b678f31170a7bedeff696f8c0b12f0f48..6a0d270739df4cef7951aaa46b8c8547e18c5ea3 100644 (file)
@@ -928,6 +928,8 @@ static int client_initialize_time_events(sd_dhcp_client *client) {
 
         r = sd_event_source_set_priority(client->timeout_resend,
                                          client->event_priority);
+        if (r < 0)
+                goto error;
 
         r = sd_event_source_set_description(client->timeout_resend, "dhcp4-resend-timer");
         if (r < 0)
index d48e1cdd13623f403556e3939118d25c655d224a..50a169237457e7c08ce1da9907cfb4fe58a704ed 100644 (file)
@@ -1,2 +1 @@
-/libsystemd.sym
 /libsystemd.pc
similarity index 93%
rename from src/libsystemd/libsystemd.sym.m4
rename to src/libsystemd/libsystemd.sym
index 3121e7128254ae1f6d48cebcce57597e7288bc61..809db1f6cc38992e9ee703fc45efd14acceb57fc 100644 (file)
@@ -459,41 +459,3 @@ global:
         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;
-)
index dac157be166a851123809239baf34941ad46c8bf..64a5a972aef719637fdf9e527eb094ae3797bdea 100644 (file)
@@ -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 */
index 88c058889a451a5533ec56c78404edf5c2500123..c3e20ee1bf70167000a212f98ad659a40634f079 100644 (file)
@@ -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);
index 3aaaabf4edb27f4388a6d5d3d7d08ee5998f5234..f08db2da893c25d13f4986b4b50cbe9f38ade677 100644 (file)
@@ -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
 
index 7c5264fad4481ca15571cc5fe80b4d35bb2c92a1..132b37526eb12ba93f7d0c1e6a7bc1f2abb71861 100644 (file)
@@ -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;
+
+}
index af5f65d073c67f3974c73fad6bea11db623aecab..56516be9faa0fcd5df16fb66429d02ea628a5883 100644 (file)
@@ -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);
index 8060e9882cccd9429945eb1f62ce606abe7d2cb6..c45247756691fcee116d0d50d35d661502217768 100644 (file)
@@ -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;
index 2805b29839c8bd78343c509bcb9a7abcc75d05be..5dd64687074a1fc8878a50feb4ac95cc4171caab 100644 (file)
@@ -1239,18 +1239,9 @@ int bus_set_address_user(sd_bus *b) {
                 if (!ee)
                         return -ENOMEM;
 
-#ifdef ENABLE_KDBUS
                 (void) asprintf(&b->address, KERNEL_USER_BUS_ADDRESS_FMT ";" UNIX_USER_BUS_ADDRESS_FMT, getuid(), ee);
-#else
-                (void) asprintf(&b->address, UNIX_USER_BUS_ADDRESS_FMT, ee);
-#endif
-        } else {
-#ifdef ENABLE_KDBUS
+        } else
                 (void) asprintf(&b->address, KERNEL_USER_BUS_ADDRESS_FMT, getuid());
-#else
-                return -ECONNREFUSED;
-#endif
-        }
 
         if (!b->address)
                 return -ENOMEM;
@@ -1372,11 +1363,7 @@ int bus_set_address_system_machine(sd_bus *b, const char *machine) {
         if (!e)
                 return -ENOMEM;
 
-#ifdef ENABLE_KDBUS
         b->address = strjoin("x-machine-kernel:machine=", e, ";x-machine-unix:machine=", e, NULL);
-#else
-        b->address = strjoin("x-machine-unix:machine=", e, NULL);
-#endif
         if (!b->address)
                 return -ENOMEM;
 
@@ -2952,22 +2939,33 @@ _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. */
+                if (scope != BUS_MATCH_LOCAL) {
+
+                        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;
index 40c67046da41c0cb722a1eee0832889d258c2a52..a1687b1c7bb81f835b3fbfec61649f003837abac 100644 (file)
@@ -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;
 }
index 00880c983b543a563c0388d5346bbe73197d0a3d..76964aa0ccd71ac0aecdd4d19d38d076e5a75f0c 100644 (file)
@@ -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;
 
index 8079d0b5aa93231341570bfbb1386becae99edf2..210b889c4f987cd7998b38ac69e0578c77e98603 100644 (file)
@@ -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;
index f9e6ddfb3fb53a8054ad0d3c94cc5292a183e23b..a6c01f7d85bcb4dbff6730dc1ce37393ed3dc42f 100644 (file)
@@ -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;
         }
 
index e6f9ec7845f3f793a6620296f6f8a494d1eed0f9..8ebcd3f5ca73ed5e891afeedd53c798429a57046 100644 (file)
@@ -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) {
index 6720899def35326046503295c152f49b2fab27ad..21d7268120a9b115ce621951d8447cc86370a3c1 100644 (file)
 #include "bus-error.h"
 #include "conf-parser.h"
 #include "clean-ipc.h"
-#include "logind-user.h"
 #include "smack-util.h"
 #include "formats-util.h"
+#include "label.h"
+#include "logind-user.h"
 
 User* user_new(Manager *m, uid_t uid, gid_t gid, const char *name) {
         User *u;
@@ -105,7 +106,7 @@ void user_free(User *u) {
         free(u);
 }
 
-int user_save(User *u) {
+static int user_save_internal(User *u) {
         _cleanup_free_ char *temp_path = NULL;
         _cleanup_fclose_ FILE *f = NULL;
         int r;
@@ -113,9 +114,6 @@ int user_save(User *u) {
         assert(u);
         assert(u->state_file);
 
-        if (!u->started)
-                return 0;
-
         r = mkdir_safe_label("/run/systemd/users", 0755, 0, 0);
         if (r < 0)
                 goto finish;
@@ -258,6 +256,15 @@ finish:
         return r;
 }
 
+int user_save(User *u) {
+        assert(u);
+
+        if (!u->started)
+                return 0;
+
+        return user_save_internal (u);
+}
+
 int user_load(User *u) {
         _cleanup_free_ char *display = NULL, *realtime = NULL, *monotonic = NULL;
         Session *s = NULL;
@@ -323,7 +330,7 @@ static int user_mkdir_runtime_path(User *u) {
         if (path_is_mount_point(p, 0) <= 0) {
                 _cleanup_free_ char *t = NULL;
 
-                (void) mkdir(p, 0700);
+                (void) mkdir_label(p, 0700);
 
                 if (mac_smack_use())
                         r = asprintf(&t, "mode=0700,smackfsroot=*,uid=" UID_FMT ",gid=" GID_FMT ",size=%zu", u->uid, u->gid, u->manager->runtime_dir_size);
@@ -351,6 +358,10 @@ static int user_mkdir_runtime_path(User *u) {
                                 goto fail;
                         }
                 }
+
+                r = label_fix(p, false, false);
+                if (r < 0)
+                        log_warning_errno(r, "Failed to fix label of '%s', ignoring: %m", p);
         }
 
         u->runtime_path = p;
@@ -453,6 +464,12 @@ int user_start(User *u) {
         if (r < 0)
                 return r;
 
+        /* Save the user data so far, because pam_systemd will read the
+         * XDG_RUNTIME_DIR out of it while starting up systemd --user.
+         * We need to do user_save_internal() because we have not
+         * "officially" started yet. */
+        user_save_internal(u);
+
         /* Spawn user systemd */
         r = user_start_service(u);
         if (r < 0)
@@ -704,7 +721,7 @@ UserState user_get_state(User *u) {
         if (u->stopping)
                 return USER_CLOSING;
 
-        if (u->slice_job || u->service_job)
+        if (!u->started || u->slice_job || u->service_job)
                 return USER_OPENING;
 
         if (u->sessions) {
index cd226f55fc8cc5502b5256817aaa548114885716..feb381d0b11d03e1e7d10e9fb7be3d7571211d0f 100644 (file)
@@ -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[];
 
index b5d419000c7ae3b354ec75a37abadcfd5cd5d27e..0ebdfdf19e587e394e0185a934814c9ee436a00e 100644 (file)
@@ -177,7 +177,6 @@ static int export_legacy_dbus_address(
                 uid_t uid,
                 const char *runtime) {
 
-#ifdef ENABLE_KDBUS
         _cleanup_free_ char *s = NULL;
         int r;
 
@@ -195,7 +194,7 @@ static int export_legacy_dbus_address(
                 pam_syslog(handle, LOG_ERR, "Failed to set bus variable.");
                 return r;
         }
-#endif
+
         return PAM_SUCCESS;
 }
 
index 0892479a9aa7a137f4d9fbd6bacb3bafaf3f5ae1..7813a0bcc72ac354a2a7523a5f037e22c2690846 100644 (file)
@@ -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
 
@@ -509,11 +509,7 @@ int bus_machine_method_open_login(sd_bus_message *message, void *userdata, sd_bu
         if (r < 0)
                 return r;
 
-#ifdef ENABLE_KDBUS
 #  define ADDRESS_FMT "x-machine-kernel:pid=%1$" PID_PRI ";x-machine-unix:pid=%1$" PID_PRI
-#else
-#  define ADDRESS_FMT "x-machine-unix:pid=%1$" PID_PRI
-#endif
         if (asprintf(&address, ADDRESS_FMT, m->leader) < 0)
                 return log_oom();
 
index eea994d0b374cc64e9d1b16a5d8ceecb29a84b65..3c31629d1e919c3bf86ae8c36b23eef12e0cdd37 100644 (file)
@@ -1013,6 +1013,9 @@ static int parse_argv(int argc, char *argv[]) {
                 return -EINVAL;
         }
 
+        if (arg_userns && access("/proc/self/uid_map", F_OK) < 0)
+                return log_error_errno(EOPNOTSUPP, "--private-users= is not supported, kernel compiled without user namespace support.");
+
         arg_retain = (arg_retain | plus | (arg_private_network ? 1ULL << CAP_NET_ADMIN : 0)) & ~minus;
 
         if (arg_boot && arg_kill_signal <= 0)
index 8fcc289957b648747549f0a0ba678a625626d53b..11350dad71935bf9988bb12912c738477bbfba45 100644 (file)
@@ -545,7 +545,6 @@ int bus_open_system_systemd(sd_bus **_bus) {
          * directly to the system instance, instead of going via the
          * bus */
 
-#ifdef ENABLE_KDBUS
         r = sd_bus_new(&bus);
         if (r < 0)
                 return r;
@@ -564,7 +563,6 @@ int bus_open_system_systemd(sd_bus **_bus) {
         }
 
         bus = sd_bus_unref(bus);
-#endif
 
         r = sd_bus_new(&bus);
         if (r < 0)
@@ -598,7 +596,6 @@ int bus_open_user_systemd(sd_bus **_bus) {
 
         assert(_bus);
 
-#ifdef ENABLE_KDBUS
         r = sd_bus_new(&bus);
         if (r < 0)
                 return r;
@@ -616,7 +613,6 @@ int bus_open_user_systemd(sd_bus **_bus) {
         }
 
         bus = sd_bus_unref(bus);
-#endif
 
         e = secure_getenv("XDG_RUNTIME_DIR");
         if (!e)
@@ -2034,15 +2030,22 @@ int bus_path_decode_unique(const char *path, const char *prefix, char **ret_send
 
 bool is_kdbus_wanted(void) {
         _cleanup_free_ char *value = NULL;
+#ifdef ENABLE_KDBUS
+        const bool configured = true;
+#else
+        const bool configured = false;
+#endif
+
         int r;
 
-        if (get_proc_cmdline_key("kdbus", NULL) <= 0) {
-                r = get_proc_cmdline_key("kdbus=", &value);
-                if (r <= 0 || parse_boolean(value) != 1)
-                        return false;
-        }
+        if (get_proc_cmdline_key("kdbus", NULL) > 0)
+                return true;
+
+        r = get_proc_cmdline_key("kdbus=", &value);
+        if (r <= 0)
+                return configured;
 
-        return true;
+        return parse_boolean(value) == 1;
 }
 
 bool is_kdbus_available(void) {
index ac5eb16f62dab9c8c8ca24f30919611536034058..068da465d9fcdb816c9230cbe6cc6d251b110939 100644 (file)
@@ -274,8 +274,10 @@ static int output_short(
         if (r < 0)
                 return log_error_errno(r, "Failed to get journal fields: %m");
 
-        if (!message)
+        if (!message) {
+                log_debug("Skipping message without MESSAGE= field.");
                 return 0;
+        }
 
         if (!(flags & OUTPUT_SHOW_ALL))
                 strip_tab_ansi(&message, &message_len);
index 2fe4eb81cfbeb6afcbf4dce27e5eba5cbef19f27..9d39beb3404deee679733c33f1d14ea43da890bc 100644 (file)
@@ -60,8 +60,13 @@ static int update_timeout(void) {
 
                 flags = WDIOS_ENABLECARD;
                 r = ioctl(watchdog_fd, WDIOC_SETOPTIONS, &flags);
-                if (r < 0)
-                        return log_warning_errno(errno, "Failed to enable hardware watchdog: %m");
+                if (r < 0) {
+                        /* ENOTTY means the watchdog is always enabled so we're fine */
+                        log_full(errno == ENOTTY ? LOG_DEBUG : LOG_WARNING,
+                                 "Failed to enable hardware watchdog: %m");
+                        if (errno != ENOTTY)
+                                return -errno;
+                }
 
                 r = ioctl(watchdog_fd, WDIOC_KEEPALIVE, 0);
                 if (r < 0)
index 289dddbaacb8bb78ca8301e0bf14cb91f245928a..72f874d8a91f55fa6cd0c30bc23e48dfbe8d90fe 100644 (file)
@@ -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));
index a8025c825b01661314418ad607efd7f479458d76..8358789e6f00b86defad436bddee1a7de3fc2ada 100644 (file)
@@ -145,19 +145,19 @@ static void test_config_parse_exec(void) {
         assert_se(r == 0);
         assert_se(c1->command_next == NULL);
 
-        log_info("/* no command, check for bad memory access */");
+        log_info("/* no command, whitespace only, reset */");
         r = config_parse_exec(NULL, "fake", 3, "section", 1,
                               "LValue", 0, "    ",
                               &c, NULL);
         assert_se(r == 0);
-        assert_se(c1->command_next == NULL);
+        assert_se(c == NULL);
 
         log_info("/* ignore && honour_argv0 */");
         r = config_parse_exec(NULL, "fake", 4, "section", 1,
                               "LValue", 0, "-@/RValue///slashes3 argv0a r1",
                               &c, NULL);
         assert_se(r >= 0);
-        c1 = c1->command_next;
+        c1 = c;
         check_execcommand(c1, "/RValue/slashes3", "argv0a", "r1", NULL, true);
 
         log_info("/* ignore && honour_argv0 */");
@@ -195,6 +195,19 @@ static void test_config_parse_exec(void) {
         c1 = c1->command_next;
         check_execcommand(c1, "/goo/goo", NULL, "boo", NULL, false);
 
+        log_info("/* two semicolons in a row */");
+        r = config_parse_exec(NULL, "fake", 5, "section", 1,
+                              "LValue", 0,
+                              "-@/RValue argv0 r1 ; ; "
+                              "/goo/goo boo",
+                              &c, NULL);
+        assert_se(r >= 0);
+        c1 = c1->command_next;
+        check_execcommand(c1, "/RValue", "argv0", "r1", NULL, true);
+
+        /* second command fails because the executable name is ";" */
+        assert_se(c1->command_next == NULL);
+
         log_info("/* trailing semicolon */");
         r = config_parse_exec(NULL, "fake", 5, "section", 1,
                               "LValue", 0,
@@ -206,6 +219,26 @@ static void test_config_parse_exec(void) {
 
         assert_se(c1->command_next == NULL);
 
+        log_info("/* trailing semicolon, no whitespace */");
+        r = config_parse_exec(NULL, "fake", 5, "section", 1,
+                              "LValue", 0,
+                              "-@/RValue argv0 r1 ;",
+                              &c, NULL);
+        assert_se(r >= 0);
+        c1 = c1->command_next;
+        check_execcommand(c1, "/RValue", "argv0", "r1", NULL, true);
+
+        assert_se(c1->command_next == NULL);
+
+        log_info("/* trailing semicolon in single quotes */");
+        r = config_parse_exec(NULL, "fake", 5, "section", 1,
+                              "LValue", 0,
+                              "-@/RValue argv0 r1 ';'",
+                              &c, NULL);
+        assert_se(r >= 0);
+        c1 = c1->command_next;
+        check_execcommand(c1, "/RValue", "argv0", "r1", ";", true);
+
         log_info("/* escaped semicolon */");
         r = config_parse_exec(NULL, "fake", 5, "section", 1,
                               "LValue", 0,
@@ -218,12 +251,22 @@ static void test_config_parse_exec(void) {
         log_info("/* escaped semicolon with following arg */");
         r = config_parse_exec(NULL, "fake", 5, "section", 1,
                               "LValue", 0,
-                              "/sbin/find \\; x",
+                              "/sbin/find \\; /x",
+                              &c, NULL);
+        assert_se(r >= 0);
+        c1 = c1->command_next;
+        check_execcommand(c1,
+                          "/sbin/find", NULL, ";", "/x", false);
+
+        log_info("/* escaped semicolon as part of an expression */");
+        r = config_parse_exec(NULL, "fake", 5, "section", 1,
+                              "LValue", 0,
+                              "/sbin/find \\;x",
                               &c, NULL);
         assert_se(r >= 0);
         c1 = c1->command_next;
         check_execcommand(c1,
-                          "/sbin/find", NULL, ";", "x", false);
+                          "/sbin/find", NULL, "\\;x", NULL, false);
 
         log_info("/* encoded semicolon */");
         r = config_parse_exec(NULL, "fake", 5, "section", 1,
@@ -234,6 +277,25 @@ static void test_config_parse_exec(void) {
         c1 = c1->command_next;
         check_execcommand(c1, "/bin/find", NULL, ";", NULL, false);
 
+        log_info("/* quoted semicolon */");
+        r = config_parse_exec(NULL, "fake", 5, "section", 1,
+                              "LValue", 0,
+                              "/bin/find \";\"",
+                              &c, NULL);
+        assert_se(r >= 0);
+        c1 = c1->command_next;
+        check_execcommand(c1, "/bin/find", NULL, ";", NULL, false);
+
+        log_info("/* quoted semicolon with following arg */");
+        r = config_parse_exec(NULL, "fake", 5, "section", 1,
+                              "LValue", 0,
+                              "/sbin/find \";\" /x",
+                              &c, NULL);
+        assert_se(r >= 0);
+        c1 = c1->command_next;
+        check_execcommand(c1,
+                          "/sbin/find", NULL, ";", "/x", false);
+
         log_info("/* spaces in the filename */");
         r = config_parse_exec(NULL, "fake", 5, "section", 1,
                               "LValue", 0,
index ed8db4511502cff9a2f59562977acf5885c0be0f..ad9ea3bcce85792c44b10e7cfebf5207498aa062 100644 (file)
@@ -1304,6 +1304,244 @@ static void test_unquote_first_word(void) {
         assert_se(streq(t, "pi\360\237\222\251le"));
         free(t);
         assert_se(p == original + 32);
+
+        p = original = "fooo\\";
+        assert_se(unquote_first_word(&p, &t, UNQUOTE_RELAX) > 0);
+        assert_se(streq(t, "fooo"));
+        free(t);
+        assert_se(p == original + 5);
+
+        p = original = "fooo\\";
+        assert_se(unquote_first_word(&p, &t, UNQUOTE_CUNESCAPE_RELAX) > 0);
+        assert_se(streq(t, "fooo\\"));
+        free(t);
+        assert_se(p == original + 5);
+
+        p = original = "fooo\\";
+        assert_se(unquote_first_word(&p, &t, UNQUOTE_CUNESCAPE_RELAX|UNQUOTE_RELAX) > 0);
+        assert_se(streq(t, "fooo\\"));
+        free(t);
+        assert_se(p == original + 5);
+
+        p = original = "fooo\\";
+        assert_se(unquote_first_word(&p, &t, UNQUOTE_CUNESCAPE|UNQUOTE_CUNESCAPE_RELAX) > 0);
+        assert_se(streq(t, "fooo\\"));
+        free(t);
+        assert_se(p == original + 5);
+
+        p = original = "\"foo\\";
+        assert_se(unquote_first_word(&p, &t, 0) == -EINVAL);
+        assert_se(p == original + 5);
+
+        p = original = "\"foo\\";
+        assert_se(unquote_first_word(&p, &t, UNQUOTE_RELAX) > 0);
+        assert_se(streq(t, "foo"));
+        free(t);
+        assert_se(p == original + 5);
+
+        p = original = "\"foo\\";
+        assert_se(unquote_first_word(&p, &t, UNQUOTE_CUNESCAPE_RELAX) == -EINVAL);
+        assert_se(p == original + 5);
+
+        p = original = "\"foo\\";
+        assert_se(unquote_first_word(&p, &t, UNQUOTE_CUNESCAPE_RELAX|UNQUOTE_RELAX) > 0);
+        assert_se(streq(t, "foo\\"));
+        free(t);
+        assert_se(p == original + 5);
+
+        p = original = "\"foo\\";
+        assert_se(unquote_first_word(&p, &t, UNQUOTE_CUNESCAPE|UNQUOTE_CUNESCAPE_RELAX|UNQUOTE_RELAX) > 0);
+        assert_se(streq(t, "foo\\"));
+        free(t);
+        assert_se(p == original + 5);
+
+        p = original = "fooo\\ bar quux";
+        assert_se(unquote_first_word(&p, &t, UNQUOTE_RELAX) > 0);
+        assert_se(streq(t, "fooo bar"));
+        free(t);
+        assert_se(p == original + 10);
+
+        p = original = "fooo\\ bar quux";
+        assert_se(unquote_first_word(&p, &t, UNQUOTE_CUNESCAPE_RELAX) > 0);
+        assert_se(streq(t, "fooo bar"));
+        free(t);
+        assert_se(p == original + 10);
+
+        p = original = "fooo\\ bar quux";
+        assert_se(unquote_first_word(&p, &t, UNQUOTE_CUNESCAPE_RELAX|UNQUOTE_RELAX) > 0);
+        assert_se(streq(t, "fooo bar"));
+        free(t);
+        assert_se(p == original + 10);
+
+        p = original = "fooo\\ bar quux";
+        assert_se(unquote_first_word(&p, &t, UNQUOTE_CUNESCAPE) == -EINVAL);
+        assert_se(p == original + 5);
+
+        p = original = "fooo\\ bar quux";
+        assert_se(unquote_first_word(&p, &t, UNQUOTE_CUNESCAPE|UNQUOTE_CUNESCAPE_RELAX) > 0);
+        assert_se(streq(t, "fooo\\ bar"));
+        free(t);
+        assert_se(p == original + 10);
+
+        p = original = "\\w+@\\K[\\d.]+";
+        assert_se(unquote_first_word(&p, &t, UNQUOTE_CUNESCAPE) == -EINVAL);
+        assert_se(p == original + 1);
+
+        p = original = "\\w+@\\K[\\d.]+";
+        assert_se(unquote_first_word(&p, &t, UNQUOTE_CUNESCAPE|UNQUOTE_CUNESCAPE_RELAX) > 0);
+        assert_se(streq(t, "\\w+@\\K[\\d.]+"));
+        free(t);
+        assert_se(p == original + 12);
+
+        p = original = "\\w+\\b";
+        assert_se(unquote_first_word(&p, &t, UNQUOTE_CUNESCAPE|UNQUOTE_CUNESCAPE_RELAX) > 0);
+        assert_se(streq(t, "\\w+\b"));
+        free(t);
+        assert_se(p == original + 5);
+}
+
+static void test_unquote_first_word_and_warn(void) {
+        const char *p, *original;
+        char *t;
+
+        p = original = "foobar waldo";
+        assert_se(unquote_first_word_and_warn(&p, &t, 0, NULL, "fake", 1, original) > 0);
+        assert_se(streq(t, "foobar"));
+        free(t);
+        assert_se(p == original + 7);
+
+        assert_se(unquote_first_word_and_warn(&p, &t, 0, NULL, "fake", 1, original) > 0);
+        assert_se(streq(t, "waldo"));
+        free(t);
+        assert_se(p == original + 12);
+
+        assert_se(unquote_first_word_and_warn(&p, &t, 0, NULL, "fake", 1, original) == 0);
+        assert_se(!t);
+        assert_se(p == original + 12);
+
+        p = original = "\"foobar\" \'waldo\'";
+        assert_se(unquote_first_word_and_warn(&p, &t, 0, NULL, "fake", 1, original) > 0);
+        assert_se(streq(t, "foobar"));
+        free(t);
+        assert_se(p == original + 9);
+
+        assert_se(unquote_first_word_and_warn(&p, &t, 0, NULL, "fake", 1, original) > 0);
+        assert_se(streq(t, "waldo"));
+        free(t);
+        assert_se(p == original + 16);
+
+        assert_se(unquote_first_word_and_warn(&p, &t, 0, NULL, "fake", 1, original) == 0);
+        assert_se(!t);
+        assert_se(p == original + 16);
+
+        p = original = "\"";
+        assert_se(unquote_first_word_and_warn(&p, &t, 0, NULL, "fake", 1, original) == -EINVAL);
+        assert_se(p == original + 1);
+
+        p = original = "\'";
+        assert_se(unquote_first_word_and_warn(&p, &t, 0, NULL, "fake", 1, original) == -EINVAL);
+        assert_se(p == original + 1);
+
+        p = original = "\'fooo";
+        assert_se(unquote_first_word_and_warn(&p, &t, 0, NULL, "fake", 1, original) == -EINVAL);
+        assert_se(p == original + 5);
+
+        p = original = "\'fooo";
+        assert_se(unquote_first_word_and_warn(&p, &t, UNQUOTE_RELAX, NULL, "fake", 1, original) > 0);
+        assert_se(streq(t, "fooo"));
+        free(t);
+        assert_se(p == original + 5);
+
+        p = original = " foo\\ba\\x6ar ";
+        assert_se(unquote_first_word_and_warn(&p, &t, UNQUOTE_CUNESCAPE, NULL, "fake", 1, original) > 0);
+        assert_se(streq(t, "foo\ba\x6ar"));
+        free(t);
+        assert_se(p == original + 13);
+
+        p = original = " foo\\ba\\x6ar ";
+        assert_se(unquote_first_word_and_warn(&p, &t, 0, NULL, "fake", 1, original) > 0);
+        assert_se(streq(t, "foobax6ar"));
+        free(t);
+        assert_se(p == original + 13);
+
+        p = original = "    f\\u00f6o \"pi\\U0001F4A9le\"   ";
+        assert_se(unquote_first_word_and_warn(&p, &t, UNQUOTE_CUNESCAPE, NULL, "fake", 1, original) > 0);
+        assert_se(streq(t, "föo"));
+        free(t);
+        assert_se(p == original + 13);
+
+        assert_se(unquote_first_word_and_warn(&p, &t, UNQUOTE_CUNESCAPE, NULL, "fake", 1, original) > 0);
+        assert_se(streq(t, "pi\360\237\222\251le"));
+        free(t);
+        assert_se(p == original + 32);
+
+        p = original = "fooo\\";
+        assert_se(unquote_first_word_and_warn(&p, &t, UNQUOTE_RELAX, NULL, "fake", 1, original) > 0);
+        assert_se(streq(t, "fooo"));
+        free(t);
+        assert_se(p == original + 5);
+
+        p = original = "fooo\\";
+        assert_se(unquote_first_word_and_warn(&p, &t, 0, NULL, "fake", 1, original) > 0);
+        assert_se(streq(t, "fooo\\"));
+        free(t);
+        assert_se(p == original + 5);
+
+        p = original = "fooo\\";
+        assert_se(unquote_first_word_and_warn(&p, &t, UNQUOTE_CUNESCAPE, NULL, "fake", 1, original) > 0);
+        assert_se(streq(t, "fooo\\"));
+        free(t);
+        assert_se(p == original + 5);
+
+        p = original = "\"foo\\";
+        assert_se(unquote_first_word_and_warn(&p, &t, 0, NULL, "fake", 1, original) == -EINVAL);
+        assert_se(p == original + 5);
+
+        p = original = "\"foo\\";
+        assert_se(unquote_first_word_and_warn(&p, &t, UNQUOTE_RELAX, NULL, "fake", 1, original) > 0);
+        assert_se(streq(t, "foo"));
+        free(t);
+        assert_se(p == original + 5);
+
+        p = original = "\"foo\\";
+        assert_se(unquote_first_word_and_warn(&p, &t, UNQUOTE_CUNESCAPE, NULL, "fake", 1, original) == -EINVAL);
+        assert_se(p == original + 5);
+
+        p = original = "\"foo\\";
+        assert_se(unquote_first_word_and_warn(&p, &t, UNQUOTE_CUNESCAPE|UNQUOTE_RELAX, NULL, "fake", 1, original) > 0);
+        assert_se(streq(t, "foo"));
+        free(t);
+        assert_se(p == original + 5);
+
+        p = original = "fooo\\ bar quux";
+        assert_se(unquote_first_word_and_warn(&p, &t, UNQUOTE_RELAX, NULL, "fake", 1, original) > 0);
+        assert_se(streq(t, "fooo bar"));
+        free(t);
+        assert_se(p == original + 10);
+
+        p = original = "fooo\\ bar quux";
+        assert_se(unquote_first_word_and_warn(&p, &t, 0, NULL, "fake", 1, original) > 0);
+        assert_se(streq(t, "fooo bar"));
+        free(t);
+        assert_se(p == original + 10);
+
+        p = original = "fooo\\ bar quux";
+        assert_se(unquote_first_word_and_warn(&p, &t, UNQUOTE_CUNESCAPE, NULL, "fake", 1, original) > 0);
+        assert_se(streq(t, "fooo\\ bar"));
+        free(t);
+        assert_se(p == original + 10);
+
+        p = original = "\\w+@\\K[\\d.]+";
+        assert_se(unquote_first_word_and_warn(&p, &t, UNQUOTE_CUNESCAPE, NULL, "fake", 1, original) > 0);
+        assert_se(streq(t, "\\w+@\\K[\\d.]+"));
+        free(t);
+        assert_se(p == original + 12);
+
+        p = original = "\\w+\\b";
+        assert_se(unquote_first_word_and_warn(&p, &t, UNQUOTE_CUNESCAPE, NULL, "fake", 1, original) > 0);
+        assert_se(streq(t, "\\w+\b"));
+        free(t);
+        assert_se(p == original + 5);
 }
 
 static void test_unquote_many_words(void) {
@@ -1610,6 +1848,7 @@ int main(int argc, char *argv[]) {
         test_glob_exists();
         test_execute_directory();
         test_unquote_first_word();
+        test_unquote_first_word_and_warn();
         test_unquote_many_words();
         test_parse_proc_cmdline();
         test_raw_clone();
index 027a5c2ca80c9dac522466297589b0895b415e67..42f757c4b701d637c0dfe2cd1ca7f8a3528092aa 100644 (file)
@@ -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;
                                 }
index d3797bb5e660048bc81775a92fbc9695e25da7e5..11f1f6372eac73cc626ac99cf1e10ebb5a70e76b 100644 (file)
@@ -43,6 +43,7 @@
 #include "sd-daemon.h"
 #include "sd-event.h"
 
+#include "terminal-util.h"
 #include "signal-util.h"
 #include "event-util.h"
 #include "netlink-util.h"
@@ -735,14 +736,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);
@@ -1687,6 +1688,10 @@ int main(int argc, char *argv[]) {
 
                 log_info("starting version " VERSION);
 
+                /* connect /dev/null to stdin, stdout, stderr */
+                if (log_get_max_level() < LOG_DEBUG)
+                        (void) make_null_stdio();
+
                 pid = fork();
                 switch (pid) {
                 case 0:
index 23175de1f5608776251b2fe22b3c14a70680aca0..81b1d79c374a01d1238b1945086adff85f430ae4 100644 (file)
@@ -6,9 +6,7 @@
 #  (at your option) any later version.
 
 g systemd-journal   - -
-m4_ifdef(`ENABLE_KDBUS',
 u systemd-bus-proxy - "systemd Bus Proxy"
-)m4_dnl
 m4_ifdef(`ENABLE_NETWORKD',
 u systemd-network   - "systemd Network Management"
 )m4_dnl
index 7f216f331c2997f4b990190517abaaeef57730c9..64d9130c24e3be64b0e0ca7f0b5b5a305121d3b7 100644 (file)
@@ -17,13 +17,11 @@ Before=network.target multi-user.target shutdown.target
 Conflicts=shutdown.target
 Wants=network.target
 
-m4_ifdef(`ENABLE_KDBUS',
 # On kdbus systems we pull in the busname explicitly, because it
 # carries policy that allows the daemon to acquire its name.
 Wants=org.freedesktop.network1.busname
 After=org.freedesktop.network1.busname
 
-)m4_dnl
 [Service]
 Type=notify
 Restart=on-failure
index 98ae564af62777ed8cf3047ce9b6b46c51f55dfe..dce540245816a264594c0b35824958a4c6c550a6 100644 (file)
@@ -10,13 +10,11 @@ Description=Network Name Resolution
 Documentation=man:systemd-resolved.service(8)
 After=systemd-networkd.service network.target
 
-m4_ifdef(`ENABLE_KDBUS',
 # On kdbus systems we pull in the busname explicitly, because it
 # carries policy that allows the daemon to acquire its name.
 Wants=org.freedesktop.resolve1.busname
 After=org.freedesktop.resolve1.busname
 
-)m4_dnl
 [Service]
 Type=notify
 Restart=always